Pipeable
This package help you to execute functions and pipe the result of that function has first parameter of the next function. Something like pipe operator on Erlang, Elixir or others functional programming languages.
This is a very little library, that all this is a currying function.
After do some benchmark y create the same functionality using classes, because classes are more fast.
With functions x 20,242 ops/sec ±6.54% (70 runs sampled)
With Classes x 381,338 ops/sec ±5.22% (70 runs sampled)
New sintax for the class
var _pipe = default var result = // return => [2,4,6]
Example using the old function pipe
var _pipe = Pipeable var arrayPiped = // return a Pipe function that carry the array [1,2,3] var arrayMaped = // return a Pipe function that carry the result of the map // return the value of the currying => [2,4,6]
Can be used chaining functions
{ return value} // return the value of the currying => [2,4,6]