GithubHelp home page GithubHelp logo

Comments (4)

suguru03 avatar suguru03 commented on September 23, 2024

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.

cvlmtg avatar cvlmtg commented on September 23, 2024

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.

suguru03 avatar suguru03 commented on September 23, 2024

Oh, I'm sorry I forgot to fix them.
Thank you for pointing it out, I'll fix soon.

from neo-async.

cvlmtg avatar cvlmtg commented on September 23, 2024

thanks!

from neo-async.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.