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 143
var 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) {
2
0
0
91 92 93 94 95 96 97 98 99 100
if (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(
0
0
202
async.parallel is the most popular function in async (1226 examples)