{"name":"iso-url","version":"1.1.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":">=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":"77dc5d90e728b2112b0e3d30438903df7a58eb55","bugs":{"url":"https://github.com/hugomrdias/iso-url/issues"},"homepage":"https://github.com/hugomrdias/iso-url#readme","_id":"iso-url@1.1.1","_nodeVersion":"14.15.5","_npmVersion":"6.14.11","dist":{"integrity":"sha512-37Cti4a8RtLsyZhwVqt9nXHOJ43rN6oJ34TeS9Ol72hCt8d1HsTJEaTRhbLF5GtCutRmrLad2/XorWR6q7gSxA==","shasum":"ae624aee1aeb180238bdaa747756a438024a1003","tarball":"http://registry-npm.ywwl.com/iso-url/download/iso-url-1.1.1.tgz","fileCount":15,"unpackedSize":13161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPQgECRA9TVsSAnZWagAAXeIP/Ag2QuFq7pN/VLymr4r/\n4a6khl8A/YuQFx6uqrPiDmk7VqanZ/tM0NjsAWCmh390PgcGcx1f/cj3je2y\nIU497nF2J8sg/R7wlTJhroGOUcqVKZaNWGyVk2K0fevqDWFN191gfHaCd5Ik\nGdux/GiJK73vF5lqyv2hYgAM3IokoXnhdIfMsUbzCjZfi634kia8xkn7vkN0\nzlphoTkAAYZOmJSWxVJ159awUS6dvzcnm17DtvLcCqGDAhXgCUGXWX0OKu+o\nTjf5QIkZHxJW38MAwQE+kmQRzx/T4m6/fHlSJOtc8RUoWlOxC61njVPr9kKU\nYdgTEKKsmpSu60urJRyepkwJHxUJuao85YBgWGJxV0Dirki2on8PS1eJliCI\n0eCfYw4fnsd7r+TVQMTJAkbh7vIPN62k2RdJa/BiUl4YXgmy1vLGcQ1YsbMd\nE8f6I+iWrFy2sGtTqEUAfnlbsFWGc0mWtrpYl/qPVWlYlSWqoOQr5ETF3RVb\nCUw/LyE3x7Kugz7HkcaUzaLkuu4HE2xKrYQpsLcCwjnV9bl7k+FEoTL+aXRo\nHAYEjFk3AGwfVJ3T0HMC4Je9tenbTsgWxPLnYXNpMSd6t+PBWi4PmIIYvmzf\nOTK/oDWRqD3Fgwaf9M181pnTfFW4LrH6L+MYYoipDptr90Sko0GYTt4mRXW4\nQbkU\r\n=BeRK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3VCIgiAIiBygN2dPhkM22p9DTDtxWz9XkfJDfdcogNAIhAP03kj3nDSGwGHUKhYTAaaMSN0Q3GCz0GNXdDgYwZcOQ"}],"size":4769,"noattachment":false,"key":"/iso-url/-/iso-url-1.1.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.1.1_1614612484240_0.9762938275078827"},"_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":1614612484366,"_cnpm_publish_time":1614612484366,"dist-tags":{"latest":"1.2.1"}}