Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var iterator = function(n, callback) {
callback();
};
var funcs = {
'async': function(callback) {
async.eachLimit(array, 4, iterator, callback);
},
'neo-async_v0': function(callback) {
neo_async_v0.eachLimit(array, 4, iterator, callback);
},
'neo-async_v1': function(callback) {
neo_async_v1.eachLimit(array, 4, iterator, callback);
}
};
comparator
.set(funcs)
.async()
.times(times)
.start()
.result(function(err, res) {
console.log(res);
});
var iterator = function(n, callback) {
callback();
};
var funcs = {
'async': function(callback) {
async.each(array, iterator, callback);
},
'neo-async_v0': function(callback) {
neo_async_v0.each(array, iterator, callback);
},
'neo-async_v1': function(callback) {
neo_async_v1.each(array, iterator, callback);
}
};
comparator
.set(funcs)
.async()
.times(times)
.start()
.result(function(err, res) {
console.log(res);
});
callback(null, res);
});
},
'neo-async_v0': function(callback) {
neo_async_v0.detectSeries(array, iterator, function(res) {
callback(null, res);
});
},
'neo-async_v1': function(callback) {
neo_async_v1.detectSeries(array, iterator, function(res) {
callback(null, res);
});
}
};
comparator
.set(funcs)
.async()
.times(times)
.start()
.result(function(err, res) {
console.log(res);
});
done(null, n);
};
var funcs = {
'async': function(callback) {
async.times(count, iterator, callback);
},
'neo-async_v0': function(callback) {
neo_async_v0.times(count, iterator, callback);
},
'neo-async_v1': function(callback) {
neo_async_v1.times(count, iterator, callback);
}
};
comparator
.set(funcs)
.async()
.times(times)
.start()
.result(function(err, res) {
console.log(res);
});
var iterator = function(n, callback) {
callback(null, n);
};
var funcs = {
'async': function(callback) {
async.sortBy(array, iterator, callback);
},
'neo-async_v0': function(callback) {
neo_async_v0.sortBy(array, iterator, callback);
},
'neo-async_v1': function(callback) {
neo_async_v1.sortBy(array, iterator, callback);
}
};
comparator
.set(funcs)
.async()
.times(times)
.start()
.result(function(err, res) {
console.log(res);
});
var funcs = {
'async': function(callback) {
c = 0;
async.mapSeries(array, iterator, callback);
},
'neo-async_v0': function(callback) {
c = 0;
neo_async_v0.mapSeries(array, iterator, callback);
},
'neo-async_v1': function(callback) {
c = 0;
neo_async_v1.mapSeries(array, iterator, callback);
}
};
comparator
.set(funcs)
.option({
async: true,
times: times
})
.start()
.result(function(err, res) {
console.log(res);
});
},
'neo-async_v0': function(callback) {
c = 0;
neo_async_v0.filterSeries(array, iterator, function(res) {
callback(null, res);
});
},
'neo-async_v1': function(callback) {
c = 0;
neo_async_v1.filterSeries(array, iterator, function(res) {
callback(null, res);
});
}
};
comparator
.set(funcs)
.option({
async: true,
times: times
})
.start()
.result(function(err, res) {
console.log(res);
});