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) {
fork icon2
star icon0
watch icon0

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(
fork icon0
star icon0
watch icon202