URL Pathname Resolver
JSON →The `resolve-pathname` package, currently at stable version 3.0.0, offers a pure JavaScript implementation for resolving URL pathnames. Its core purpose is to replicate the exact pathname resolution behavior found in web browsers when processing the `href` attribute of an `<a>` tag. This utility is distinct from Node.js's `url.resolve`, which handles full URLs, and from other browser-specific solutions like `resolve-url` that may have DOM dependencies. It prides itself on 100% compatibility with browser pathname resolution rules without relying on a DOM environment. The package is typically very stable with an infrequent release cadence for major versions, indicating a mature and well-tested codebase. It is suitable for both Node.js and browser environments, with ESM, CommonJS, and UMD builds available.
Traffic · last 30 days ↓87% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇩🇪 Germany