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

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

Added visualizations

  • Property mode set to 100644
File size: 359 bytes
Line 
1import { flatten } from '../../array/flatten.mjs';
2import { flow as flow$1 } from '../../function/flow.mjs';
3
4function flow(...funcs) {
5 const flattenFuncs = flatten(funcs, 1);
6 if (flattenFuncs.some(func => typeof func !== 'function')) {
7 throw new TypeError('Expected a function');
8 }
9 return flow$1(...flattenFuncs);
10}
11
12export { flow };
Note: See TracBrowser for help on using the repository browser.