A tiny, fast, tree-shakeable queue and deque implementation for JavaScript.
Quetie is a JavaScript library that provides tiny, fast implementations of queue and deque data structures. It solves the need for efficient FIFO/LIFO operations in applications where bundle size and performance are critical. The library offers amortized O(1) time complexity for all operations while maintaining an extremely small footprint.
JavaScript developers who need lightweight queue/deque data structures for algorithms, task scheduling, or data processing where minimal bundle size is important.
Developers choose Quetie for its combination of minimal size (~360 bytes), excellent performance with O(1) operations, and tree-shakeable design that allows importing only needed functionality.
🎀 Just the cutest and tiniest queue/deque implementation!
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
At ~360 bytes minzipped, it adds negligible overhead to projects, as emphasized in the README's badges and feature list.
Implements amortized O(1) operations for all methods, ensuring efficiency even with large numbers of elements, as highlighted in the README.
Tree-shakeable design allows developers to import only the Queue class if Deque isn't needed, further optimizing bundle size, as noted in the features.
Provides a full double-ended queue with standard methods like push, pop, shift, and unshift, covering common use cases demonstrated in the usage examples.
The README offers basic examples only, and detailed API documentation requires inspecting type definitions, which can be a barrier for some users seeking in-depth guidance.
Lacks advanced features such as priority handling, event emissions on changes, or custom iteration protocols, making it unsuitable for complex scenarios beyond basic FIFO/LIFO.
Operations like pop on an empty queue return undefined without throwing errors, requiring additional checks in user code for robust applications.