diff options
Diffstat (limited to 'build-es/during.js')
-rw-r--r-- | build-es/during.js | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/build-es/during.js b/build-es/during.js deleted file mode 100644 index e9809cd..0000000 --- a/build-es/during.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -import noop from 'lodash-es/noop'; -import rest from 'lodash-es/rest'; - -export default function during(test, iterator, cb) { - cb = cb || noop; - - var next = rest(function(err, args) { - if (err) { - cb(err); - } else { - args.push(check); - test.apply(this, args); - } - }); - - var check = function(err, truth) { - if (err) return cb(err); - if (!truth) return cb(null); - iterator(next); - }; - - test(check); -} |