Giter Club home page Giter Club logo

Comments (10)

fat avatar fat commented on June 4, 2024

Nope -- indexOf is only called on strings in bean. And as far as i know, indexOf on strings is supported in all major browsers.

from bean.

fat avatar fat commented on June 4, 2024

Also, for what it's worth -- bean will never be made to depend on any other microlibrary -- that would defeat the purpose. Thanks for bringing this up though! cheers :)

from bean.

fat avatar fat commented on June 4, 2024

actually -- you did point out a bug with this tough :D -- so i'll keep open...

from bean.

dvv avatar dvv commented on June 4, 2024

Noooo. Take a look at https://github.com/fat/bean/blob/master/bean.js#L79 and then at https://github.com/fat/bean/blob/master/bean.js#L264. Notice the trailing .split(',') in the latter ;)

from bean.

fat avatar fat commented on June 4, 2024

yeah that split shouldn't be there -- it's only splitting the last line :P, than + it to a string... it's a string. At any rate, i'm fixing that bit now

from bean.

fat avatar fat commented on June 4, 2024

alright -- this is now a string for sure... thanks again for bringing this up -- you rock!

from bean.

dvv avatar dvv commented on June 4, 2024

Cool.
Still, nothing pressing, but I have a feeling that (nativeEvents[type]) which is O(1) is much faster than nativeEvents.indexOf('|'+type+'|') which is O(length). Just a matter of smart one-time initialization of a hash from a string. What do you think? TIA

from bean.

fat avatar fat commented on June 4, 2024

yep that makes sense -- i'll change that now.

from bean.

fat avatar fat commented on June 4, 2024

pushed -- using your object lookup -- cheers

from bean.

dvv avatar dvv commented on June 4, 2024

Thanks!

from bean.

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.