Modules@robinpath/stream

@robinpath/stream

0.1.0Public

Stream processing for large files: read, write, transform, filter, split, concat, hash without loading into memory

@robinpath/stream

Stream processing for large files: read, write, transform, filter, split, concat, hash without loading into memory

Category Functions Auth License

Why use this module?

The stream module lets you:

  • Read entire file content
  • Write data to file
  • Stream-copy a file
  • Read file line by line into array
  • Transform file line by line

All functions are callable directly from RobinPath scripts with a simple, consistent API.

Installation

npm install @robinpath/stream

Quick Start

No credentials needed — start using it right away:

stream.writeFile "./out.txt" "hello"

Available Functions

FunctionDescription
stream.readFileRead entire file content
stream.writeFileWrite data to file
stream.copyFileStream-copy a file
stream.linesRead file line by line into array
stream.transformTransform file line by line
stream.filterFilter file lines by regex pattern
stream.concatConcatenate multiple files
stream.splitSplit file into chunks
stream.countCount lines in file
stream.headRead first N lines
stream.tailRead last N lines
stream.pipeDownload URL to file via stream
stream.hashStream-hash a file

Examples

Write data to file

stream.writeFile "./out.txt" "hello"

Stream-copy a file

stream.copyFile "./a.txt" "./b.txt"

Read file line by line into array

stream.lines "./data.csv"

Integration with RobinPath

import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/stream";

const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);

const result = await rp.executeScript(`
  stream.writeFile "./out.txt" "hello"
`);

Full API Reference

See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.

Related Modules

License

MIT

Versions (1)

VersionTagPublished
0.1.0latestyesterday
Install
$ robinpath install @robinpath/stream
Version0.1.0
LicenseMIT
Unpacked Size5.7 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

Category

devops