a zip code crypto-currency system good for red ONLY

pipe.js 594B

123456789101112131415161718192021222324
  1. /** PURE_IMPORTS_START ._noop PURE_IMPORTS_END */
  2. import { noop } from './noop';
  3. /* tslint:enable:max-line-length */
  4. export function pipe() {
  5. var fns = [];
  6. for (var _i = 0; _i < arguments.length; _i++) {
  7. fns[_i - 0] = arguments[_i];
  8. }
  9. return pipeFromArray(fns);
  10. }
  11. /* @internal */
  12. export function pipeFromArray(fns) {
  13. if (!fns) {
  14. return noop;
  15. }
  16. if (fns.length === 1) {
  17. return fns[0];
  18. }
  19. return function piped(input) {
  20. return fns.reduce(function (prev, fn) { return fn(prev); }, input);
  21. };
  22. }
  23. //# sourceMappingURL=pipe.js.map