// the find
remy/min.js
Super minimal selector and event library
A 2013 micro-library (~200 bytes minified) that wraps querySelector/querySelectorAll and patches Node/NodeList with .on() and .trigger(). It's for people who wanted jQuery-like syntax without jQuery's weight, at a time when that trade-off made sense.
- Dead simple implementation — you can read and fully understand the source in 5 minutes, which is more than you can say for most DOM libraries
- Returns raw DOM nodes intentionally, so there's no wrapper object to unpeel when you need the real element
- Patches Node and NodeList directly, so document.on() works without any special-casing
- Has a test suite with delegation specs, which is more than most micro-libs from this era bothered with
- Abandoned in 2013 — the last commit is 13 years old, Travis CI badge points to a dead service, and the Flattr donate button is gone
- No way to remove event listeners — the README admits this and hand-waves it away, which will cause memory leaks in any SPA-style usage
- Patching global prototypes (Node, NodeList) is a landmine in any project sharing a DOM with third-party scripts
- The inconsistent return type ($() returns a NodeList sometimes, an Element other times depending on match count) will cause silent bugs — you have to know what you'll get before you call it