1.0.1 • Published 2 years ago
@zowanet/composite-url v1.0.1
composite-url
Install
npm install @zowanet/composite-urlyarn add @zowanet/composite-urlpnpm add @zowanet/composite-urlImport
import CompositeURL from '@zowanet/composite-url';const { default: CompositeURL } = await import('@zowanet/composite-url');Usage
console.log(new CompositeURL({
protocol: 'protocol',
username: 'username',
password: 'password',
hostname: 'hostname',
port: 9999,
pathname: 'pathname',
search: 'search',
hash: 'hash',
}).href); // "protocol://username:password@hostname:9999/pathname?search#hash"
console.log(new CompositeURL({
uri: '/path/to/file?foo=bar&baz=qux#fragment',
}).pathname); // "/path/to/file"