Files
lcbp3.np-dms.work/frontend/node_modules/framer-motion/dist/es/utils/pipe.mjs
2025-09-21 20:29:15 +07: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 };