Buckets:
| import { identity } from './identity'; | |
| export function pipe(...fns) { | |
| return pipeFromArray(fns); | |
| } | |
| export function pipeFromArray(fns) { | |
| if (fns.length === 0) { | |
| return identity; | |
| } | |
| if (fns.length === 1) { | |
| return fns[0]; | |
| } | |
| return function piped(input) { | |
| return fns.reduce((prev, fn) => fn(prev), input); | |
| }; | |
| } | |
| //# sourceMappingURL=pipe.js.map |
Xet Storage Details
- Size:
- 390 Bytes
- Xet hash:
- 569b8d7feb51766f603a79bf9bebc113b55375877822929882bfc600b0246b09
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.