Giter Club home page Giter Club logo

Comments (4)

icoloma avatar icoloma commented on June 14, 2024

The easiest workaround I can think of is not extending $ with underscore methods. Probably it shouldn't be done anyway - otherwise, this is prone to happen with other methods like map(), first() or last(). Specifically, underscore.find() is hugely different from bonzo.find() - and they both will be mapped to $.find

At this point I am willing to assume that underscore requires an ender bridge that does not augment the ender object (keeping $ and _ separate), but I could find that is out of the question.

Maybe ender should not extend the $ object automatically. I can do that easily by adding my own script at the end of the chain, e.g.:

var $ = ender;
$.ender(require('qwery'));
$.ender(require('bonzo'));
$.ender(require('reqwest'));

var B = require('backbone')
  , _ = require('underscore')

This would give me control over the method overlapping.

from bonzo.

ded avatar ded commented on June 14, 2024

i return this because it seemed more useful, and had nothing to do with compliance. i don't think i'm going to change this, but i really appreciate the deep dive and full explanation.

from bonzo.

icoloma avatar icoloma commented on June 14, 2024

At this point I am not really affected by this bug anymore, but just to make the point clear: if you use

ender build domready bonzo bean qwery underscore

Methods like $('div').html('foo') will be broken. The only solution I could find was NOT to extend $ with the methods of the included library (in this case, underscore), unless it includes an ender bridge.

As I said, this problem no longer affects me (I have gone other ways since) and I see it more of an ender issue than bonzo.

from bonzo.

ded avatar ded commented on June 14, 2024

i'll have to try out that scenario and see how it breaks. bonzo should be using it's own each, and not underscores.

from bonzo.

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.