MCPcopy Create free account
hub / github.com/FormidableLabs/react-live / compose

Function compose

packages/react-live/src/utils/transpile/compose.ts:5–11  ·  view source on GitHub ↗
(...functions: ((...args: T[]) => T)[])

Source from the content-addressed store, hash-verified

3 */
4
5export default function compose<T>(...functions: ((...args: T[]) => T)[]) {
6 return functions.reduce(
7 (acc, currentFn) =>
8 (...args: T[]) =>
9 acc(currentFn(...args)),
10 );
11}

Callers 2

generateElementFunction · 0.85
compose.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected