Mini-URL
Light weight, universal, URL parser for node and the browser with built in caching.
Installation
npm install mini-url
Example
// Parse a url into an object./* { protocol: 'http:', host: 'host.com:8080', port: '8080', hostname: 'host.com', hash: '#hash', search: '?query=string', pathname: '/p/a/t/h', href: 'http://host.com:8080/p/a/t/h?query=string#hash'} */ // Stringify an object into a url string./* http://host.com:8080/p/a/t/h?query=string#hash */
Contributions
- Use
npm test
to build and run tests.
Please feel free to create a PR!