We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
const assert = require('assert'), async = require('neo-async'); function *makeGen(arr) { let idx = 0; let len = arr.length; while (idx < len) { yield arr[idx]; idx += 1; } } const LIMIT = 2; const INPUT = ['abc', 'def', 'ghi', 'jkl']; const gen = makeGen(INPUT); async.mapLimit(gen, LIMIT, (v, cb) => { setTimeout(() => { console.log(`processing: ${v}`); cb(undefined, v); }, Math.round(Math.random()*1000)); }, (err, results) => { assert(!err, err); console.log(`ACTUAL: ${results}`); assert.strict.deepEqual(results, INPUT); });
Results with neo-async:
processing: abc processing: def processing: jkl processing: ghi
Results with async:
processing: abc processing: def processing: jkl processing: ghi ACTUAL: abc,def,ghi,jkl
The text was updated successfully, but these errors were encountered:
@mattoshry Thanks for the issue! I will take a look this weekend.
Sorry, something went wrong.
a9e87f0
suguru03
No branches or pull requests
Results with neo-async:
Results with async:
The text was updated successfully, but these errors were encountered: