piton-pipe

0.0.4 • Public • Published

piton-pipe - Build and run an Async pipeline of functions.

An input value is given to the pipe and passed each function in turn. This allows async operations to process the value.

Installation

  npm install piton-pipe

Usage

 var pipe = require('piton-pipe').createPipe(['onCreate']);
 pipe.add(function(value, callback) {
  callback(null, value + 2;
 });
 pipe.add(function(value, callback) {
  callback(null, value / 3);
 });
 var value = 7;
 pipe.run(value, function(error, newValue) {
   console.log(newValue);
 });

Credits

Licence

Licenced under the New BSD License

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.4
    66
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.4
    66
  • 0.0.3
    1
  • 0.0.2
    1

Package Sidebar

Install

npm i piton-pipe

Weekly Downloads

68

Version

0.0.4

License

none

Last publish

Collaborators

  • serby