mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
23 lines
402 B
TypeScript
23 lines
402 B
TypeScript
import { parse, stringify } from 'ale-url-parser';
|
|
|
|
let url;
|
|
let urlObject;
|
|
|
|
url = stringify({});
|
|
console.log(url);
|
|
|
|
url = stringify({
|
|
protocol: 'protocol',
|
|
host: 'host',
|
|
path: ['foo', 'bar', 'baz'],
|
|
hash: 'hash',
|
|
query: {
|
|
foo: 1,
|
|
bar: [2, '3']
|
|
}
|
|
});
|
|
console.log(url);
|
|
|
|
urlObject = parse('//any.dom.ain.co.m/foo/bar?test=1&test=2#hash');
|
|
console.log(urlObject);
|