data-flow
v0.1.0
Published
data-flow help you to adjust data step-by-step
Downloads
5
Maintainers
Readme
data-flow
install
npm install data-flow
usage
import flow from "data-flow";
// flow.set( '<name>', '<config>', [ /* steps */ ] );
flow.set( 'step1', {}, [
function( data ){ data.id++; return data;},
function( data ){ data.id++; return data;},
function( data ){ data.id++; return data;},
function( data ){ data.id++; return data.id;},
] );
flow.start( 'step1', { id : 1 } ).then( function( data ){
console.log( data ); // 4
} );