// the take
Surreal is a 320-line, dependency-free jQuery-style DOM helper that adds `me()` and `any()` as cleaner aliases for querySelector/querySelectorAll, plus chaining, event helpers, and async animation timelines. It's aimed at developers who want a little jQuery ergonomics without pulling in a framework — particularly those already using htmx. The 'Locality of Behavior' angle lets you write `me()` inside an inline `<script>` tag to grab the parent element without needing an ID.
The `me()` vs `any()` split is genuinely useful — it makes explicit whether you expect one element or many, which jQuery's `$()` never did cleanly. The async timeline pattern using `sleep()` gives you readable sequential animations without a separate animation library. The plugin system is simple and surgical: push a function onto `surreal.plugins`, and it gets wired into the chain automatically. At 320 lines with no build step, the whole thing is auditable in an afternoon.
Polluting globals via `globalsAdd()` is on by default, which means `me`, `any`, `sleep`, `halt`, and friends land on `window` — a naming collision waiting to happen in any project that's more than a few files. The `me()` parent-detection trick only works in synchronous inline scripts; the README itself warns it breaks inside `<script type='module'>`, which is most modern bundler output. Event removal with `off()` requires keeping a reference to the original function, same footgun as vanilla `removeEventListener`. With 1,700 stars and only 29 forks, there's almost no community-contributed extension or battle-testing signal.
We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →