source: node_modules/es-toolkit/dist/function/flow.js

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
RevLine 
[a762898]1'use strict';
2
3Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
5function 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
15exports.flow = flow;
Note: See TracBrowser for help on using the repository browser.