source: node_modules/es-toolkit/dist/function/flow.mjs@ ba17441

Last change on this file since ba17441 was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 291 bytes
Line 
1function flow(...funcs) {
2 return function (...args) {
3 let result = funcs.length ? funcs[0].apply(this, args) : args[0];
4 for (let i = 1; i < funcs.length; i++) {
5 result = funcs[i].call(this, result);
6 }
7 return result;
8 };
9}
10
11export { flow };
Note: See TracBrowser for help on using the repository browser.