New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

bare-url

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bare-url

WHATWG URL implementation for JavaScript

latest
Source
npmnpm
Version
2.5.4
Version published
Weekly downloads
27M
-10.17%
Maintainers
1
Weekly downloads
 
Created
Source

bare-url

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-url

Usage

const { 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')

API

See the bare-url reference.

License

Apache-2.0

FAQs

Package last updated on 02 Sep 2026

Related posts