diff options
Diffstat (limited to 'lib/doUntil.js')
-rw-r--r-- | lib/doUntil.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/doUntil.js b/lib/doUntil.js new file mode 100644 index 0000000..3bc783f --- /dev/null +++ b/lib/doUntil.js @@ -0,0 +1,9 @@ +'use strict'; + +import doWhilst from './doWhilst'; + +export default function doUntil(iterator, test, cb) { + return doWhilst(iterator, function() { + return !test.apply(this, arguments); + }, cb); +} |