UNPKG
funcom
Version:
latest (0.2.0)
0.2.0
0.1.0
0.0.0
Functional composition helpers
github.com/nextools/metarepo
nextools/metarepo
funcom
/
web
/
pipe.js
12 lines
(11 loc)
•
306 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
export
function
pipe
(
) {
for
(
var
_len =
arguments
.
length
, fns =
new
Array
(_len), _key =
0
; _key < _len; _key++) { fns[_key] =
arguments
[_key]; }
return
function
(
initial
) {
return
fns.
reduce
(
function
(
arg, fn
) {
return
fn
(arg); }, initial); }; }
//# sourceMappingURL=pipe.js.map