A tiny (865-byte) client-side router for the browser with support for named parameters, wildcards, and history integration.
Navaid is a lightweight client-side router for JavaScript applications running in the browser. It handles URL routing, parameter parsing, and history management, enabling single-page application navigation without full-fledged framework overhead. It solves the problem of adding routing functionality to projects where bundle size and simplicity are critical.
Developers building lightweight JavaScript applications, static sites, or small projects that need client-side routing without the bulk of larger frameworks.
Developers choose Navaid for its minuscule footprint (865 bytes) and straightforward API, offering essential routing features without bloat. It's a pragmatic alternative to heavier routers when performance and minimalism are priorities.
A navigation aid (aka, router) for the browser in 850 bytes~!
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 865 bytes gzipped, it adds negligible overhead, ideal for performance-sensitive projects where every byte counts, as highlighted in the README's size badges.
Supports static routes, named parameters, optional segments, and wildcards, allowing dynamic routing without bloat, as demonstrated in the API examples.
Automatically binds to browser history events and intercepts anchor clicks for smooth navigation, making it feel like a single-page application with minimal setup.
With straightforward methods like on(), run(), and listen(), it's easy to set up and manage routes, reducing the learning curve for basic routing needs.
Lacks advanced routing capabilities such as route guards, lazy loading, or nested route configurations beyond wildcards, which may require manual implementation for complex apps.
Does not provide out-of-the-box integration with popular frameworks, forcing developers to wire it up themselves, increasing setup complexity and potential for errors.
404 handling is configurable but minimal, and async route handlers need explicit error management, leading to boilerplate code and less robustness in edge cases.