Introducing Buflux, a lightweight and high-performance buffer library for managing fixed-capacity data. Designed for Node.js and modern browsers, Buflux is perfect for high-throughput systems like task queues, rate limiting and in-memory caching.
Key features:
- Fixed-Capacity Buffers: Manage data efficiently with defined limits.
- Overflow Strategies: Choose between REJECT (block when full) and EVICT (auto-remove oldest items).
- Event-Driven Design: React to enqueue, dequeue, overflow, and reject events.
- Zero Dependencies: Fast, simple, and lightweight (~15kB unpacked).
Ideal for task queues, rate limiting, caching and data streams.
Learn more:
- GitHub: https://github.com/faizanu94/buflux
- npm: https://www.npmjs.com/package/buflux