{"name":"iso-url","version":"1.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":">=14"},"browser":{"./src/url.js":"./src/url-browser.js"},"scripts":{"check":"yarn lint && yarn prepare && yarn test && yarn test:browser","prepare":"tsc","test":"c8 -r json --report-dir .nyc_output --clean fresh-tape test.js | tap-spec","test:browser":"playwright-test test.js --runner tape --cov | tap-spec","lint":"eslint *.js src/*.js","cov":"yarn test && yarn test:browser && nyc report --reporter=html && sirv coverage"},"types":"dist/index.js","keywords":["url","node","browser"],"dependencies":{},"devDependencies":{"c8":"^7.6.0","eslint":"^7.20.0","eslint-config-ipfs":"^2.0.0","fresh-tape":"^5.1.1","np":"^7.4.0","nyc":"^15.0.0","playwright-test":"^2.0.2","sirv-cli":"^1.0.11","tap-spec":"^5.0.0","typescript":"^4.2.2"},"eslintConfig":{"extends":"ipfs"},"gitHead":"17a3f4fbf925a92a03750a424454cfa580796c96","bugs":{"url":"https://github.com/hugomrdias/iso-url/issues"},"homepage":"https://github.com/hugomrdias/iso-url#readme","_id":"iso-url@1.1.2","_nodeVersion":"14.15.5","_npmVersion":"6.14.11","dist":{"integrity":"sha512-ldHLr3QmITXU1TgAVXeQu9PiNLZ+HEArEQzkUt8pc9slPbbVhZK+ePpXYEtJ083WrDSccNd9vhIqzwcaxX9iqA==","shasum":"739626fe3dfa51bcecbd438ee6e3325772e84212","tarball":"http://registry-npm.ywwl.com/iso-url/download/iso-url-1.1.2.tgz","fileCount":16,"unpackedSize":13732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPQqsCRA9TVsSAnZWagAAT28P/2/M+Li0QlqJ78Y5Rrr/\nClluBME2MRsRb+Slr6NI4YETFH4PWFILec1Oq2kYvYrWGrjhXaQ9CqcIOaZb\nia8URy0tAG97S1/qb9KC7w0qn3IsQqCdM8cjin1JbU4DFdrOzD6Qg++tAb6z\nwQMt3na8Ju0NOWwD/mvMlr5MDlkbpC7E0xkyVH3LGLzEVwCoNSiKlOXWXB0m\nAaaLkCwOM4kPGYY3cPsIDZn/VZI0poB+0MZ0pVJraNH3fikC87t2OjCb7bcf\nXL3t3og6zDDHpyYadQ1p735Yd7/Rye/nvBd46VGCsTznuBuunBoWgGiSVRZD\nuWkKHaL3vGQsYcm0KE/d8EI5ZqPKITtY3SMry5vCvHK5zD15EVGYrSGI0dMJ\n/rsk1MajWbooNQH5RXUiehMsshjQtUCcasHUVXDuV06m/ZlIDEgIKMulGVvM\nL/hSzRxoX/cVuZ5jtTeuYCKdXGzUdc5yn9Wti/+DOEUKDq+m3imO3aX8LsyX\nEEqYOjUYre24c2Vtaf07UhmSO0S4HqwOc6ykwkB6aROzTrTMpZ1koCCoisVc\n8qW/r6hmD3JdPpykUCS8sefoHQfFj6HDG7ilWyZ4VNyByWEukQIugaFNCCbv\nohsdfZqXuzf+SFMb5xLUeGrbT/eSYtvmRwpnSYHT4JJcOR9G/kRnYpL2+5EH\nCqSh\r\n=Qe//\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHdj1l5Oh4B61OLrzIcVPKMBgXuiUWb3GqCpedgzLR4wAiBi+uTg5erbtrbEjGWkJr9xrckj8RnnD8p417qyGtLrQg=="}],"size":4900,"noattachment":false,"key":"/iso-url/-/iso-url-1.1.2.tgz"},"_npmUser":{"name":"hugomrdias","email":"hugomrdias@gmail.com"},"directories":{},"maintainers":[{"name":"hugomrdias","email":"hugomrdias@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iso-url_1.1.2_1614613164055_0.028271028196314996"},"_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":1614613164211,"_cnpm_publish_time":1614613164211,"dist-tags":{"latest":"1.2.1"}}