Launching today

zep.js
Tiny event pipeline with autocleanup, debounce & AbortSignal
5 followers
Tiny event pipeline with autocleanup, debounce & AbortSignal
5 followers
Zep.js is an ultra-lightweight (265 bytes gzipped), zero-dependency JavaScript utility that turns event listeners into clean, reactive pipelines with automatic lifecycle management and debouncing. What makes Zep.js standout? - Ultra-lightweight: Only 265 bytes gzipped. - Built-in Auto-Cleanup. - Integrated Debouncing & Filtering. - Race-Condition Proof. - Avoids event-handling plumbing & boilerplate entirely.





zep.js: events for slackers 🦥 ;)
Like most devs, I really dislike the boilerplate plumbing that comes with handling events.
Not simple click handlers, but the more "complex" stuff like debounced search, throttled scrolling or resize handlers, or requestAnimationFrame synchronization.
Every single time, I find myself setting up loose let-variables, timers, and manual cleanup.
I wanted to solve this with an ultra-lightweight, composable solution.
Inspired by RxJS (don't worry, it's NOT RxJS—no complex observables or heavy streams here), I simply borrowed the idea of turning events into declarative pipelines.
Key features:
- Extremely small (<1.3KB gzipped total, core is ~265 bytes gzipped).
- Completely synchronous execution core by default (no microtask queue overhead).
- Built-in AbortSignal / auto-cleanup integration. Timed operators clean themselves up automatically.
Here is what an auto-cancelling, debounced search looks like, using zep.js: