summaryrefslogtreecommitdiff
path: root/lib/until/index.js
blob: 704c38b01835c930b49695a2626cb6f4a1ad3b2e (plain)
1
2
3
4
5
6
7
8
9
'use strict';

var whilst = require('async.whilst');

module.exports = function until(test, iterator, cb) {
    return whilst(function() {
        return !test.apply(this, arguments);
    }, iterator, cb);
};