| I maintain an alternative to jQuery called Cash [0], this looks cool! If you are interested in joining forces OP it'd be cool to have this capability in Cash itself. IMO that'd be the best of both world because this feature is cool and useful, and Cash's methods are most probably closer to jQuery's, better tested and there are more of them available (76 vs 44). For example, your `on` method [1]: - Doesn't support event delegation. - Doesn't support event namespaces. - Doesn't support receiving an argument mapping events to callbacks like jQuery also can. - It seems to have subtle bugs, like the way the events string is split makes so that double consecutive spaces in it (which can happen as a result of a typo) will result in listening to the empty string event. Basically: 'foo bar'.split ( ' ' ) => ['foo', '', 'bar'] (there are two spaces between foo and bar). The `on` method we are using in Cash [2] is a lot more convoluted than that. On one hand it requires more bytes, but on the other the chances of it behaving exactly like jQuery's are much higher. In fact we can also run jQuery's test suite with Cash to spot issues. Feel free to ping me if you are interested in joining forces. [0]: https://github.com/fabiospampinato/cash [1]: https://github.com/sachinchoolur/replace-jquery#on [2]: https://github.com/fabiospampinato/cash/blob/master/src/even... |
My intention was not to build another JavaScript utility library. I just wanted to make my JavaScript libraries jQuery independent.