Comments (4)
https://github.com/caolan/async/blob/master/CHANGELOG.md#breaking-changes
filter, reject, some, every, and related functions now expect an error as the first callback argument, rather than just a simple boolean. Pass null as the first argument, or use fs.access instead of fs.exists. (#118, #774, #1028, #1041)
Async v2 and Neo-Async v2 were changed. The first argument always takes an error.
So you have to change as following.
function iterator(obj, done) {
if (obj.id === 1) {
done(null, true);
} else {
done(null, false);
}
}
from neo-async.
then you have to fix the doc. I checked neo-async doc on http://suguru03.github.io/neo-async/doc/async.detect.html and it says:
// array (not use error handling)
var iterator = function(num, done) {
setTimeout(function() {
order.push(num);
done(num % 2); // <------ here
}, num * 10);
};
there is just one argument for the callback. You can't expect users of you library to read the documentation of another one.
from neo-async.
Oh, I'm sorry I forgot to fix them.
Thank you for pointing it out, I'll fix soon.
from neo-async.
thanks!
from neo-async.
Related Issues (20)
- Fortify Security Scan Shows Null Security Key Issue HOT 1
- Callback was already called. HOT 1
- Is it possible to cancel running task ? HOT 1
- document how generate all files present in npm dist tarball HOT 2
- Require Individual methods HOT 2
- auto allows functions to start after error is passed HOT 5
- Callback was already called in async.js HOT 4
- Missing LICENSE file in npm package HOT 2
- possible error in the retry() function HOT 1
- (sync) iterator called after finish with Sets HOT 3
- FYI: "event-stream" dependency is backdoored, apparently starting from v3.3.5 HOT 3
- difference between angelfall and waterfall HOT 2
- Spelling mistake in 'use strict' HOT 1
- mapLimit of Generator doesn't invoke final callback HOT 1
- Does it support ie 11? HOT 3
- Important - Avoid Array.prototype.shift/unshift HOT 1
- neo-async/async.js:throwError doesnt display very useful error for all cases. HOT 5
- Undocumented breaking change (now incompatible with caolan/async) HOT 1
- webpack deprecation warning HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neo-async.