Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function iterateSendings(iterator)
{
asynckit.serial(common.sendings, function(item, type, callback)
{
// each item is an array by itself
asynckit.serial(item, function(test, id, cb)
{
// differentiate elements within same type
iterator(test, type + '-' + id, cb);
}, callback);
}, function noop(err){ assert.ifError(err, 'expects all sendings to finish without errors'); });
}
asynckit.serial(common.sendings, function(item, type, callback)
{
// each item is an array by itself
asynckit.serial(item, function(test, id, cb)
{
// differentiate elements within same type
iterator(test, type + '-' + id, cb);
}, callback);
}, function noop(err){ assert.ifError(err, 'expects all sendings to finish without errors'); });
}
function iterateRequests(iterator)
{
asynckit.serial(common.requests, iterator, function noop(err){ assert.ifError(err, 'expects all requests to finish without errors'); });
}