summaryrefslogtreecommitdiff
path: root/build-es/seq.js
diff options
context:
space:
mode:
Diffstat (limited to 'build-es/seq.js')
-rw-r--r--build-es/seq.js28
1 files changed, 0 insertions, 28 deletions
diff --git a/build-es/seq.js b/build-es/seq.js
deleted file mode 100644
index c9e02c1..0000000
--- a/build-es/seq.js
+++ /dev/null
@@ -1,28 +0,0 @@
-'use strict';
-
-import noop from 'lodash-es/noop';
-import rest from 'lodash-es/rest';
-import reduce from './reduce';
-
-export default function seq( /* functions... */ ) {
- var fns = arguments;
- return rest(function(args) {
- var that = this;
-
- var cb = args[args.length - 1];
- if (typeof cb == 'function') {
- args.pop();
- } else {
- cb = noop;
- }
-
- reduce(fns, args, function(newargs, fn, cb) {
- fn.apply(that, newargs.concat([rest(function(err, nextargs) {
- cb(err, nextargs);
- })]));
- },
- function(err, results) {
- cb.apply(that, [err].concat(results));
- });
- });
-}