How to use the until function from async
Find comprehensive JavaScript async.until code examples handpicked from public code repositorys.
134 135 136 137 138 139 140 141 142 143var mkdir = function (dir, callback) { self.emit('mkdir', dir); sftp.mkdir(dir, attrs, callback); }; async.until(function () { return exists; }, function (done) { // detect if the directory exists sftp.stat(dir, function (err, attr) {
91 92 93 94 95 96 97 98 99 100if (err != null) { return callback(err) } let doc = null return async.until( cb => cb(null, doc != null || files.length === 0), function (cb) { const file = files.shift() return fs.readFile(
async.parallel is the most popular function in async (1226 examples)