package
WHATWG URL for Node & Browser.
npm install universal-urlGitHub-flavored package documentation.
Across all versions, last 30 days.
486,150 in 30 days
Runtime metadata.
Tagged topics.
Latest published Nov 28, 2018
WHATWG
URLfor Node & Browser.
>= 8, the native implementation will be used.< 8, a shim will be used.Node.js >= 6 is required. To install, type this at the command line:
npm install universal-urlconst {URL, URLSearchParams} = require('universal-url');
const url = new URL('http://domain/');
const params = new URLSearchParams('?param=value');Global shim:
require('universal-url').shim();
const url = new URL('http://domain/');
const params = new URLSearchParams('?param=value');The bundled file size of this library can be large for a web browser. If this is a problem, try using universal-url-lite in your build as an alias for this module.
Estimated unpacked size across 7 packages.
829.2 kB
Includes dependencies.