{"name":"url-parse-lax","version":"4.0.0","description":"Lax url.parse() with support for protocol-less URLs & IPs","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/url-parse-lax.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava"},"keywords":["url","uri","parse","parser","loose","lax","protocol","less","protocol-less","ip","ipv4","ipv6"],"dependencies":{"prepend-http":"^3.0.1"},"devDependencies":{"ava":"^2.1.0","xo":"^0.24.0"},"gitHead":"ec2996366f094edd7d719cdb4aa0536acd2ff516","bugs":{"url":"https://github.com/sindresorhus/url-parse-lax/issues"},"homepage":"https://github.com/sindresorhus/url-parse-lax#readme","_id":"url-parse-lax@4.0.0","_nodeVersion":"8.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-CazaJJZUPr1EWmHjcntgS1F1q6YOpQROD6Z+aTb9obxgOFsRydnqYkRCh5xDJ3LhqTID46JrWaT7PsF7Oms0PA==","shasum":"94f9b0dd8190e8baee1ce2049f79e5c67dc3318b","tarball":"http://registry-npm.ywwl.com/url-parse-lax/download/url-parse-lax-4.0.0.tgz","fileCount":4,"unpackedSize":4590,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc/+bQCRA9TVsSAnZWagAAmWQQAINgal71bdh4rKpFozVg\n7qhUzTGO+hAwrXq6gKcivjjC6Npu8E14DkeHP2YLiL77b7K1aV+7Y0BHiUWT\nxXNk1IwAwrbZK0B1XH2jrRB9iy7c6lu5gz5y0UBPWzJOBBw29XsCj5M4bMbD\nw0DfX1x3/M3v77rWfmZzJMaBAqQOe0iuBUkAtRV/MnMySuVyuaPfDnK+ZEJk\nqk/xq0J4NZmRvuQRA/Pt2+pyzFUbo1taNjf+I0c0szgQyfqh0vgkslF2ra0J\nuyMVf6CF1YR6XwT2kFRyJ8rjP4hstu8HMctFsyNi7Ni6APc8VqTVnwzdmFQt\nsx+Lganvup+F8GDwVx8SPT38HmOQwmTPiY2DyFj5FmmhH9J5vcCCPUcNpHLO\niahQZmknXoAGe97e+5+JxGf3luWqZEqPETmI9EXV9ixJa+EvHy66PWHm6Z4l\nseX5ibP0SBGZrxz96DfMr+p9zxjCX4W1uqtQGwjHrujgnhfYkI0kdlSUMPiB\nDuMQViv7IaKlA1iFZi1RiRPokAHg4Y3EQ7NOQVoyhGQrimjh+Kd40f9miPwP\nkDl6albBo0H7hnaxyCCU0On3Ff4P3ZGm3Huhx/s6f8oQ5zuB7viDpjpBXyQI\nDx/hDKfDJBWSySU+r2wQw0jUtMLHkiY4aD3EM38FBgt6FrLPCT1og8Ex01as\nKPyR\r\n=SoYy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICzdg9LtGYiTMUbRK7y6dD379T6uZ4SjY1XfVCBeQ5cEAiAf/32X2qJS8D0oL1QBZ111AVtvexZHY30Eg8T/tr5ZgQ=="}],"size":2192,"noattachment":false,"key":"/url-parse-lax/-/url-parse-lax-4.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/url-parse-lax_4.0.0_1560274639544_0.024723955458921143"},"_hasShrinkwrap":false,"readme":"# url-parse-lax\n\n> Lax [`url.parse()`](https://nodejs.org/docs/latest/api/url.html#url_url_parse_urlstr_parsequerystring_slashesdenotehost) with support for protocol-less URLs & IPs\n\n## Install\n\n```\n$ npm install url-parse-lax\n```\n\n## Usage\n\n```js\nimport urlParseLax from 'url-parse-lax';\n\nurlParseLax('sindresorhus.com');\n/*\n{\n\tprotocol: 'https:',\n\tslashes: true,\n\tauth: null,\n\thost: 'sindresorhus.com',\n\tport: null,\n\thostname: 'sindresorhus.com',\n\thash: null,\n\tsearch: null,\n\tquery: null,\n\tpathname: '/',\n\tpath: '/',\n\thref: 'https://sindresorhus.com/'\n}\n*/\n\nurlParseLax('[2001:db8::]:8000');\n/*\n{\n\tprotocol: null,\n\tslashes: true,\n\tauth: null,\n\thost: '[2001:db8::]:8000',\n\tport: '8000',\n\thostname: '2001:db8::',\n\thash: null,\n\tsearch: null,\n\tquery: null,\n\tpathname: '/',\n\tpath: '/',\n\thref: 'http://[2001:db8::]:8000/'\n}\n*/\n```\n\nAnd with the built-in `url.parse()`:\n\n```js\nimport url from 'url';\n\nurl.parse('sindresorhus.com');\n/*\n{\n\tprotocol: null,\n\tslashes: null,\n\tauth: null,\n\thost: null,\n\tport: null,\n\thostname: null,\n\thash: null,\n\tsearch: null,\n\tquery: null,\n\tpathname: 'sindresorhus',\n\tpath: 'sindresorhus',\n\thref: 'sindresorhus'\n}\n*/\n\nurl.parse('[2001:db8::]:8000');\n/*\n{\n\tprotocol: null,\n\tslashes: null,\n\tauth: null,\n\thost: null,\n\tport: null,\n\thostname: null,\n\thash: null,\n\tsearch: null,\n\tquery: null,\n\tpathname: '[2001:db8::]:8000',\n\tpath: '[2001:db8::]:8000',\n\thref: '[2001:db8::]:8000'\n}\n*/\n```\n\n## API\n\n### urlParseLax(url, options?)\n\n#### url\n\nType: `string`\n\nThe URL to parse.\n\n#### options\n\nType: `object`\n\n##### https\n\nType: `boolean`\\\nDefault: `true`\n\nPrepend `https://` instead of `http://` to protocol-less URLs.\n\n## Related\n\n- [url-format-lax](https://github.com/sindresorhus/url-format-lax) - Lax `url.format()` that formats a hostname and port into IPv6-compatible socket form of `hostname:port`\n\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-url-parse-lax?utm_source=npm-url-parse-lax&utm_medium=referral&utm_campaign=readme\">Get professional support for this package with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n","publish_time":1560274639769,"_cnpm_publish_time":1560274639769,"dist-tags":{"latest":"6.0.0"}}