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