@atto/parse-uri
v0.0.1
Published
Parses URIs.
Downloads
7
Readme
Parses URIs.
Running
const parseUri = require('parse-uri'); // npm install @atto/parse-uri
const path = 'hello/there?opt=1#sectionA';
console.log(parseUri(path));
console.log(parseUri('https://example.org/'+path));
prints
{ origin: null,
pathname: '/hello/there',
search: '?opt=1',
hash: '#sectionA' }
{ origin: 'https://example.org',
pathname: '/hello/there',
search: '?opt=1',
hash: '#sectionA' }