|
Last change
on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
384 bytes
|
| Rev | Line | |
|---|
| [a762898] | 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|---|
| 4 |
|
|---|
| 5 | function flow(...funcs) {
|
|---|
| 6 | return function (...args) {
|
|---|
| 7 | let result = funcs.length ? funcs[0].apply(this, args) : args[0];
|
|---|
| 8 | for (let i = 1; i < funcs.length; i++) {
|
|---|
| 9 | result = funcs[i].call(this, result);
|
|---|
| 10 | }
|
|---|
| 11 | return result;
|
|---|
| 12 | };
|
|---|
| 13 | }
|
|---|
| 14 |
|
|---|
| 15 | exports.flow = flow;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.