{"name":"iso-url","version":"0.1.2","description":"Isomorphic/Universal WHATWG URL API with some support legacy node URL API","repository":{"type":"git","url":"git+https://github.com/hugomrdias/iso-url.git"},"author":{"name":"Hugo Dias","email":"hugomrdias@gmail.com","url":"hugodias.me"},"license":"MIT","main":"index.js","engines":{"node":">=10"},"browser":{"./index.js":"./index-browser.js"},"scripts":{"test":"nyc tape test.js | faucet","test:browser-local":"airtap --local test.js","lint":"eslint --cache *.js src/*.js","validate":"run-p lint test","precommit":"yarn validate","version":"yarn changelog && git add changelog.md","changelog":"conventional-changelog -p angular -i changelog.md -s -r 0","cov":"yarn test && nyc report --reporter=html && hs coverage -s -o -c-1","cov:report":"nyc report --reporter=text-lcov > coverage.lcov && codecov"},"keywords":[],"dependencies":{},"devDependencies":{"airtap":"^0.1.0","ava":"^0.25.0","codecov":"^3.1.0","conventional-changelog-cli":"^2.0.11","eslint":"^4.7.0","eslint-config-halo":"^2.3.3","faucet":"^0.0.1","http-serve":"^1.0.1","husky":"^1.2.0","np":"^3.0.4","npm-run-all":"^4.1.1","nyc":"^13.1.0","tape":"^4.9.1"},"eslintConfig":{"extends":"halo/node"},"eslintIgnore":["node_modules","coverage","dist","storybook-static","typings"],"gitHead":"15162f775104af5a5c3c6204b0ec085a6e96a3ca","bugs":{"url":"https://github.com/hugomrdias/iso-url/issues"},"homepage":"https://github.com/hugomrdias/iso-url#readme","_id":"iso-url@0.1.2","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"hugomrdias","email":"mail@hugodias.me"},"dist":{"integrity":"sha512-nDFdZX1MEJjmnYR2DUwdrpzwUCVfLldzNvfPbuMaH5ZKRwlR4gz8HHU0Hr5mumhsyviabIL7uRJW8ndAD4Rflw==","shasum":"2425360a371dcd0766f890347621a95c78d3e7a5","tarball":"http://registry-npm.ywwl.com/iso-url/download/iso-url-0.1.2.tgz","fileCount":6,"unpackedSize":6379,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcD+BiCRA9TVsSAnZWagAAoZUP/2+rN/ZaL105Fel+Ahoc\nxdCGpo2g2xKTvMWbkr3656S/ltggOt2vqGO0f0NBAPz3ctR111EaTRI1yd9I\n6ce7pk57qgVVBqkiZ5Z2JleI/nTnrU5Wme9Gq+ZUGxhDls5yBnRA3G80Z23N\nkqzwfYdx68nw60Rsh+W2p4auWtTjYOdayDtsJZx+xMbPWT0W9UZRmtQsUKms\nijPYgpnB9zHFdPS3QH1EPeeYq0H2zJBfm9VU9ENvH1wrB6BRDCVxWRyD8OKZ\nzMcEevBf87EK8An5cO8uMDVlDi0d27LVRn25H1MN2A5K0ALggrF25/6fgLk7\nG/yNjUVIsDIVcGdnwgbQNdMMlj2Yu2W8otM3X0ukYqpWRURUCEICCfg4pLWr\n//Wo2wRcnpb/uZkdYdHCimg29FYmVXzaHxOzAVqFoRnCrPWa7vQQ/A51W141\n+ol42pDKifozUxaJx19uVK4KgauFeXzcQKKv+MFSEzTF2d0c9ky8kbbRGXJr\nKoMNccdkDKZdwY5efzO/ipzKaNBwrFqu9qWDEfQm9lJuwZ9Bg4jDt0QlRhhw\nrCbql56Aearvb2b4TBmCFZS7i7c88fzaz7LfZo2BMtXNUo0LwKO1aQmAwwwv\nLPs/Lj6hbaskn/SVWjAI26o1iS3u2KdGfueAxN04POWYnRO2VUtEANDIbaEG\nHM21\r\n=9Idg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClJNVT9SED1z/yE7Apkooc1nLFSNuLAc9UtcvUwhEiMAIhAIS2sT7d6THDA9N6JiYYPXdH7jxfwXpOzelZdcncmjrO"}],"size":2640,"noattachment":false,"key":"/iso-url/-/iso-url-0.1.2.tgz"},"maintainers":[{"name":"hugomrdias","email":"mail@hugodias.me"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iso-url_0.1.2_1544544353519_0.5343303947275184"},"_hasShrinkwrap":false,"readme":"# iso-url [![NPM Version](https://img.shields.io/npm/v/iso-url.svg)](https://www.npmjs.com/package/iso-url) [![NPM Downloads](https://img.shields.io/npm/dt/iso-url.svg)](https://www.npmjs.com/package/iso-url) [![NPM License](https://img.shields.io/npm/l/iso-url.svg)](https://www.npmjs.com/package/iso-url) ![tests](https://github.com/hugomrdias/iso-url/workflows/tests/badge.svg) [![codecov](https://codecov.io/gh/hugomrdias/iso-url/badge.svg?branch=master)](https://codecov.io/gh/hugomrdias/iso-url?branch=master)\n\n> Isomorphic/Univeral WHATWG URL API with some support legacy node URL API\n\nThis package is a universal wrapper for node `url` and browser window.URL with support for legacy `url.parse` properties in the URL instance and defaults for base to support relative urls like `url.parse`. Node URL [docs](https://nodejs.org/docs/latest-v10.x/api/url.html#url_the_whatwg_url_api).\n\n## Caveats\n\nNo support for querystring objects. Use `URLSearchParams`.\n\n## Install\n\n```\n$ npm install iso-url\n```\n\n## Usage\n\n```js\nconst { URL, URLSearchParams, format, relative } = require('iso-url');\n\nconst url = new isoUrl('http://localhost/unicorns');\nconst newSearchParams = new URLSearchParams(url.searchParams);\n```\n\n## API\n\n### new URL(url, [base])\n\n#### input\n\nType: `string`\n\nThe absolute or relative input URL to parse. If input is relative, then base is required. If input is absolute, the base is ignored.\n\n#### base\n\nType: `string|URL`  \nDefault: `https://localhost` in node and `self.location.protocol + '//' + self.location.host` in the browser.\n\nThe base URL to resolve against if the input is not absolute.\n\n### format(url, [options])\n\nSame as https://nodejs.org/api/url.html#url_url_format_url_options\n\n### relative(url, [location], [protocalMap], [defaultProtocol])\n\nSame as https://github.com/dominictarr/relative-url but doesn't support this syntax `'//:9999'`\n\n## License\n\nMIT © [Hugo Dias](http://hugodias.me)\n","publish_time":1544544353650,"_cnpm_publish_time":1544544353650,"dist-tags":{"latest":"1.2.1"}}