This package has been deprecated

Author message:

This package is no longer maintained.

metapipe

2.0.3 • Public • Published

MetaPipe

Transform stream composed of transform streams! And how!

Install

Install using Node Package Manager.

npm install metapipe --save

Usage

Create a pipeline, which is just a transform stream. Add additional tranform streams at any time!

const MetaPipe = require('metapipe');
const pipeline = new MetaPipe({ objectMode: true });
 
// Default is a simple passthrough
pipeline.write({ foo: 'bar' });
pipeline.read(); // { foo: 'bar' }
 
// Add a transform to the end of the pipeline (can also `prepend`)
pipeline.append(new stream.Transform({
  transform: (data, enc, callback) => {
    data.bar = 'baz';
    callback(null, data);
  },
  objectMode: true
}));
pipeline.write({ foo: 'bar' });
pipeline.read(); // { foo: 'bar', bar: 'baz' }

License

GNU LESSER GENERAL PUBLIC LICENSE 3.0

Package Sidebar

Install

npm i metapipe

Weekly Downloads

2

Version

2.0.3

License

LGPL-3.0

Unpacked Size

15.9 kB

Total Files

9

Last publish

Collaborators

  • npm