0.0.1 • Published 6 years ago
@atto/parse-uri v0.0.1
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' }
0.0.1
6 years ago