A super fast, spec-compliant URL state machine implementation for Node.js.
URL State Machine is a high-performance URL parsing library for Node.js that implements the complete WHATWG URL specification state machine. It solves the need for fast, spec-compliant URL parsing in server-side JavaScript applications, providing structured URL components with exceptional parsing speed.
Node.js developers who need high-performance URL parsing in web servers, API services, or any application that processes URLs according to web standards.
Developers choose URL State Machine for its combination of strict WHATWG specification compliance and significantly faster parsing performance compared to alternatives, making it ideal for performance-critical URL processing tasks.
Super fast spec-compliant URL state machine for Node.js
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implements the complete WHATWG URL parsing state machine with extensive test coverage, using web-platform-tests for conformance validation and achieving 732 out of 733 tests passed for most components.
Benchmarks show it is significantly faster than alternatives like whatwg-url, with up to 576% improvement in operations per second for certain URL types, as demonstrated in the provided benchmark data.
Returns a structured object with all URL components such as scheme, host, path, and query, making it easy to access parsed data without manual string manipulation.
In some benchmarks, the built-in Node.js URL module outperforms url-state-machine (e.g., by 85.58% in one test), so it may not be the optimal choice for all parsing scenarios where native performance is adequate.
The library focuses solely on parsing URLs and does not provide built-in methods for URL construction, modification, or serialization, which might require additional utilities for full URL handling.
Test results indicate 1 failed test out of 733 for pathname and search components, meaning it is not 100% spec-compliant, which could affect edge cases in strict standard adherence.