package
WHATWG URL implementation for JavaScript
npm install bare-urlGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
WHATWG URL implementation for JavaScript, built on https://github.com/holepunchto/liburl. Provides URL and URLSearchParams classes compatible with the WHATWG URL Standard.
npm i bare-urlconst { URL, URLSearchParams } = require('bare-url')
const url = new URL('https://example.com/path?foo=bar#hash')
console.log(url.hostname) // 'example.com'
console.log(url.pathname) // '/path'
console.log(url.searchParams.get('foo')) // 'bar'To register URL and URLSearchParams as globals:
require('bare-url/global')See the bare-url reference.
bare-url is one of the addons Bare compiles into its binary, so it inherits Bare's threat model. See docs/threat-model.md for where this addon sits in it.
Apache-2.0
Estimated unpacked size across 3 packages.
5.4 MB
Includes dependencies.