Files
GNX-mailEnterprise/frontend/node_modules/framer-motion/dist/es/utils/pipe.mjs
Iliyan Angelov c67067a2a4 Mail
2025-09-14 23:24:25 +03:00

12 lines
292 B
JavaScript

/**
* Pipe
* Compose other transformers to run linearily
* pipe(min(20), max(40))
* @param {...functions} transformers
* @return {function}
*/
const combineFunctions = (a, b) => (v) => b(a(v));
const pipe = (...transformers) => transformers.reduce(combineFunctions);
export { pipe };