Giter VIP home page Giter VIP logo

Comments (5)

rwjblue avatar rwjblue commented on July 18, 2024

True, but === is much faster than isEqual.

I do agree that we should try to use isEqual though. I'm happy to review a PR for this, but I don't think I'll have much time to work on it for a while...

from ember-truth-helpers.

jmurphyau avatar jmurphyau commented on July 18, 2024

Yeah I've always had a thought of using isEqual - never as the main method though.. like maybe an option people can provide.

Thinking more a global option - you can have it on or off.. I would discourage an option being passed into the helper directly.. .. {{if (eq a b useIsEqual=true)}} or something would be painful to see in templates

from ember-truth-helpers.

devinus avatar devinus commented on July 18, 2024

I usually try to go with the most newb-friendly option by default, so using isEqual I think should be default. Using === for micro-optimization should be opt-in, e.g. (eq a b native=true)

from ember-truth-helpers.

devinus avatar devinus commented on July 18, 2024

I also think this change would require a semver major bump as well.

from ember-truth-helpers.

taras avatar taras commented on July 18, 2024

I came here to create an issue for Ember.isEqual support, but found this one instead. isEqual has been part of Ember APIs since 2.1.0. At this point, lack of support might be a bug rather than a breaking change.

I just added an issue to ember-composable-helpers that proposes support for Ember.isEqual. I would argue that isEqual should be default behaviour without a flag.

I'll submit a PR if you'll accept it.

from ember-truth-helpers.

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.