url-lite
Lightweight node url regex based drop in replacement for browsers
Inspired by Getting parts of a URL (Regex)
install
npm install url-lite --save
usage
var url = var result = urlconsole/*{ href: 'https://example.com/path?param=value#hash', origin: 'https://example.com, protocol: 'https:', username: undefined, password: undefined, host: 'example.com', hostname: 'example.com', port: undefined, pathname: '/path', search: '?param=value', hash: '#hash'}*/ var result2 = urlconsole// 'https://example.com/path?param=value#hash'
license
MIT