Pipeline Function Creator
a |> _(fn,b)
//=> fn(a,b)
a |> _(fn,b,c,d)
//=> fn(a,b,c,d)
Demo:
const _ = require('pipefn');
const result = [1, 2, 3, 4, 5] |> _([].concat, [6, 7, 8, 9, 0]);
//=> means [].concat([1,2,3,4,5],[6,7,8,9,0])
console.log(result);
//=> [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 ]
MIT
通过支付宝捐赠: