Simple but useful streams for various use cases
Transform stream that splits text into lines
var LineInputStream = require('bp-streams').LineInputStream;
var stream = new LineInputStream(options);
options:
Name | Description | Default |
---|---|---|
delimiter | the character to use to split the lines | \n |
encoding | how to encode the lines | UTF-8 |
Persists data that goes through the stream to a file and passes the raw data to the next stream
var FilesystemPersistStream = require('bp-streams').FilesystemPersistStream;
var stream = new FilesystemPersistStream(options);
options:
Name | Description | Default |
---|---|---|
filename | the target filename path | - |
Persists data that goes through the stream to a bucket in S3 and passes the raw data to the next stream
var S3PersistStream = require('bp-streams').S3PersistStream;
var stream = new S3PersistStream(options);
options:
Name | Description | Default |
---|---|---|
filename | file name | - |
path | 'filename' will be saved in this path | - |
bucket | bucket name to upload to | - |