{"name":"iso-url","version":"1.2.1","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":">=12"},"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 node test.js | tap-spec","test:browser":"playwright-test test.js --runner zora --cov | tap-spec","test:rn:ios":"rn-test --platform ios test.js | tap-spec","test:rn:android":"rn-test --platform android test.js | 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"],"devDependencies":{"c8":"^7.10.0","eslint":"^7.20.0","eslint-config-ipfs":"^2.0.1","np":"^7.4.0","nyc":"^15.0.0","playwright-test":"^7.1.0","react-native-polyfill-globals":"^3.1.0","react-native-test-runner":"^5.0.0","sirv-cli":"^1.0.14","tap-spec":"^5.0.0","typescript":"^4.4.4","zora":"^4.0.2"},"eslintConfig":{"extends":"ipfs"},"gitHead":"ef5ec33efeb1814d298391ddd108b7c08ddd0676","bugs":{"url":"https://github.com/hugomrdias/iso-url/issues"},"homepage":"https://github.com/hugomrdias/iso-url#readme","_id":"iso-url@1.2.1","_nodeVersion":"16.11.1","_npmVersion":"8.0.0","dist":{"integrity":"sha512-9JPDgCN4B7QPkLtYAAOrEuAWvP9rWvR5offAr0/SeF046wIkglqH3VXgYYP6NcsKslH80UIVgmPqNe3j7tG2ng==","shasum":"db96a49d8d9a64a1c889fc07cc525d093afb1811","tarball":"http://registry-npm.ywwl.com/iso-url/download/iso-url-1.2.1.tgz","fileCount":15,"unpackedSize":13478,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2wIPCRA9TVsSAnZWagAApjcP/0Serw7lC22k6h0OWCXW\nUJ5hKhq2nIYIrRPltlEaTy8W4ophPJIcpXKXiCiDb/sMhXRR+pC2/26uOvfp\n4eX6qsXL1yQaqpEFtgtuahOrGljYIX4L4GdSRQz6K44L94VZmbS1IFO4eqVf\nTehY1ilcFAOv3398TTc+VZIdLoijJ6xU41iX7qcVDWNPELJH6SGOuHs6bxrG\nip1llpsEnxlheifQDlNuq1Edpask/fsHch7yfQnkDwtg1xWoLkbTR60VfNnv\nbETKuDxXruklXAVI5DmV5E9uUXTlh+klRFqV9dPRhu3mdmFtAf1x3rX4z41q\nS7S8q0cla2TUQPxldZDoQhnF0pcUlgZgH9jJbzRrbw9FQ7lzXxkZlCI36Ebx\nTz9eNA7McNjMql6qk1+Ym6OAICOMqy5wHNNYKvIM0MJuPGsqI8bPaDxqTYy7\nzjN4V9TQpKY3lvnOQLZRl7u66BIgLdOQfFvFgVMh7phuD4FcNTIP3qRvCiaO\nAkC5C9lj8WIGwyFkAswvwBjInpicdjVKK1xdfPHVHHCJjPBa3ICeBiNcNY6y\n9Z3JXRBXBVakyZmEfNwUyXcuNBhU7fsOBlnLIz5L1V4p3PmvfQ9HLqXoVqUe\nMxF+56uBbfnONE7vkqzJpQKe85uz2OFig/DkbjkS/0WxM2NTPjJxsBY0fYzQ\n2qI4\r\n=+3St\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCM20QtEtGO8R0hKyPBB3DTrHgpa/VbQ1Qhzs52JR/FIAIgbODwVVQtfCVEaw2e7dTNW87n3936Xuk+ejFEFDPia6Y="}],"size":4735,"noattachment":false,"key":"/iso-url/-/iso-url-1.2.1.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.2.1_1634733040648_0.6887626548339807"},"_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":1634733040788,"_cnpm_publish_time":1634733040788,"dist-tags":{"latest":"1.2.1"}}