Blame view

天文台pc/tianwentai-ui/node_modules/motion-utils/dist/es/pipe.mjs 326 Bytes
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
  /**
   * 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 };
  //# sourceMappingURL=pipe.mjs.map