{"name":"uri-js","version":"4.2.2","description":"An RFC 3986/3987 compliant, scheme extendable URI/IRI parsing/validating/resolving library for JavaScript.","main":"dist/es5/uri.all.js","types":"dist/es5/uri.all.d.ts","directories":{"test":"tests"},"scripts":{"build:esnext":"tsc","build:es5":"rollup -c && cp dist/esnext/uri.d.ts dist/es5/uri.all.d.ts && npm run build:es5:fix-sourcemap","build:es5:fix-sourcemap":"sorcery -i dist/es5/uri.all.js","build:es5:min":"uglifyjs dist/es5/uri.all.js --support-ie8 --output dist/es5/uri.all.min.js --in-source-map dist/es5/uri.all.js.map --source-map uri.all.min.js.map --comments --compress --mangle --pure-funcs merge subexp  && mv uri.all.min.js.map dist/es5/ && cp dist/es5/uri.all.d.ts dist/es5/uri.all.min.d.ts","build":"npm run build:esnext && npm run build:es5 && npm run build:es5:min","test":"mocha -u mocha-qunit-ui dist/es5/uri.all.js tests/tests.js"},"repository":{"type":"git","url":"git+ssh://git@github.com/garycourt/uri-js.git"},"keywords":["URI","IRI","IDN","URN","UUID","HTTP","HTTPS","MAILTO","RFC3986","RFC3987","RFC5891","RFC2616","RFC2818","RFC2141","RFC4122","RFC4291","RFC5952","RFC6068","RFC6874"],"author":{"name":"Gary Court","email":"gary.court@gmail.com"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/garycourt/uri-js/issues"},"homepage":"https://github.com/garycourt/uri-js","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-external-helpers":"^6.22.0","babel-preset-latest":"^6.24.1","mocha":"^3.2.0","mocha-qunit-ui":"^0.1.3","rollup":"^0.41.6","rollup-plugin-babel":"^2.7.1","rollup-plugin-node-resolve":"^2.0.0","sorcery":"^0.10.0","typescript":"^2.8.1","uglify-js":"^2.8.14"},"dependencies":{"punycode":"^2.1.0"},"gitHead":"4f6f600fade03398c08adf2755c3a2ad66d31b3c","_id":"uri-js@4.2.2","_npmVersion":"5.6.0","_nodeVersion":"9.11.1","_npmUser":{"name":"garycourt","email":"gary.court@gmail.com"},"dist":{"integrity":"sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==","shasum":"94c540e1ff772956e2299507c010aea6c8838eb0","tarball":"http://registry-npm.ywwl.com/uri-js/download/uri-js-4.2.2.tgz","fileCount":58,"unpackedSize":533198,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbCIYyCRA9TVsSAnZWagAAa6oP/1XTWz8ftTU+nUe6aXcp\n4iluilj92MViWAwt5jsrv9f0DTowMdg0zKL7sG0rZJfXwgThlvKjqO+vEQRb\nLuf7bCtmHySHphXmWdFysAc0LHRb3eJiDLi8QVtDCzE8501X6F/3HGItBxw3\nzSsd31TFBl6m356HH1nRb/Eiz8W0MqWbJ1/T6ixU4PbUz9DxRx5BFxGTQlNM\nEdFiBR4JWTcCRov+nCmubeUhf+vDwosLGpcdEZePywgaDi3WzX8PLhBksZbf\n42ODIL0OlmHhcJeSmOgnZ4hJJVmu+59mOlLM8HcV46rp/LutEItDFOG90u4R\nDUds8cvcvY8HQ6/E3iNrQS9cL6bKOlUg0OYW6cxM9SzIWYp5awSqKa/ru1mJ\n0sAP17YYOA0dvY3RrkktCV+lthw8nmqYxL4vmL0vGR2hh5KEktSltGTI++nA\nc+0uEt559t2RCP6Of6CCsYeJ5JXzR5ncMadCuTyW1w2JCGKVoZq/bIQru7su\nvY1PxvjMh/fN/hXSa8kAd1uATLyIH9oVd3yJuRIj6zDEAcpimmqslwRX0PlB\nBZRaPS2xW++RfjnLRbA9z6wVqiXWwgR8WOPbgGTJgH9kj5T7MBLxtZd8Zj80\n1uD+BqG8iUFM4b+mtri7VlU3cWw0iVnfDwgGdleRhQ7ImEH4sJO3x5pBJGbv\n3jS9\r\n=55z0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzVuHlxmX9acm216qkyptErKakM7Zqd6nYS+cRgN9CfgIgNqNKn/Fzmi6T5CPy7FM+Tr+4+2gulwIIXDSWM8kh6aM="}],"size":137707,"noattachment":false,"key":"/uri-js/-/uri-js-4.2.2.tgz"},"maintainers":[{"name":"garycourt","email":"gary.court@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-js_4.2.2_1527285297263_0.6787805812046788"},"_hasShrinkwrap":false,"readme":"# URI.js\n\nURI.js is an [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt) compliant, scheme extendable URI parsing/validating/resolving library for all JavaScript environments (browsers, Node.js, etc).\nIt is also compliant with the IRI ([RFC 3987](http://www.ietf.org/rfc/rfc3987.txt)), IDNA ([RFC 5890](http://www.ietf.org/rfc/rfc5890.txt)), IPv6 Address ([RFC 5952](http://www.ietf.org/rfc/rfc5952.txt)), IPv6 Zone Identifier ([RFC 6874](http://www.ietf.org/rfc/rfc6874.txt)) specifications.\n\nURI.js has an extensive test suite, and works in all (Node.js, web) environments. It weighs in at 6.4kb (gzipped, 17kb deflated).\n\n## API\n\n### Parsing\n\n\tURI.parse(\"uri://user:pass@example.com:123/one/two.three?q1=a1&q2=a2#body\");\n\t//returns:\n\t//{\n\t//  scheme : \"uri\",\n\t//  userinfo : \"user:pass\",\n\t//  host : \"example.com\",\n\t//  port : 123,\n\t//  path : \"/one/two.three\",\n\t//  query : \"q1=a1&q2=a2\",\n\t//  fragment : \"body\"\n\t//}\n\n### Serializing\n\n\tURI.serialize({scheme : \"http\", host : \"example.com\", fragment : \"footer\"}) === \"http://example.com/#footer\"\n\n### Resolving\n\n\tURI.resolve(\"uri://a/b/c/d?q\", \"../../g\") === \"uri://a/g\"\n\n### Normalizing\n\n\tURI.normalize(\"HTTP://ABC.com:80/%7Esmith/home.html\") === \"http://abc.com/~smith/home.html\"\n\n### Comparison\n\n\tURI.equal(\"example://a/b/c/%7Bfoo%7D\", \"eXAMPLE://a/./b/../b/%63/%7bfoo%7d\") === true\n\n### IP Support\n\n\t//IPv4 normalization\n\tURI.normalize(\"//192.068.001.000\") === \"//192.68.1.0\"\n\n\t//IPv6 normalization\n\tURI.normalize(\"//[2001:0:0DB8::0:0001]\") === \"//[2001:0:db8::1]\"\n\n\t//IPv6 zone identifier support\n\tURI.parse(\"//[2001:db8::7%25en1]\");\n\t//returns:\n\t//{\n\t//  host : \"2001:db8::7%en1\"\n\t//}\n\n### IRI Support\n\n\t//convert IRI to URI\n\tURI.serialize(URI.parse(\"http://examplé.org/rosé\")) === \"http://xn--exampl-gva.org/ros%C3%A9\"\n\t//convert URI to IRI\n\tURI.serialize(URI.parse(\"http://xn--exampl-gva.org/ros%C3%A9\"), {iri:true}) === \"http://examplé.org/rosé\"\n\n### Options\n\nAll of the above functions can accept an additional options argument that is an object that can contain one or more of the following properties:\n\n*\t`scheme` (string)\n\n\tIndicates the scheme that the URI should be treated as, overriding the URI's normal scheme parsing behavior.\n\n*\t`reference` (string)\n\n\tIf set to `\"suffix\"`, it indicates that the URI is in the suffix format, and the validator will use the option's `scheme` property to determine the URI's scheme.\n\n*\t`tolerant` (boolean, false)\n\n\tIf set to `true`, the parser will relax URI resolving rules.\n\n*\t`absolutePath` (boolean, false)\n\n\tIf set to `true`, the serializer will not resolve a relative `path` component.\n\n*\t`iri` (boolean, false)\n\n\tIf set to `true`, the serializer will unescape non-ASCII characters as per [RFC 3987](http://www.ietf.org/rfc/rfc3987.txt).\n\n*\t`unicodeSupport` (boolean, false)\n\n\tIf set to `true`, the parser will unescape non-ASCII characters in the parsed output as per [RFC 3987](http://www.ietf.org/rfc/rfc3987.txt).\n\n*\t`domainHost` (boolean, false)\n\n\tIf set to `true`, the library will treat the `host` component as a domain name, and convert IDNs (International Domain Names) as per [RFC 5891](http://www.ietf.org/rfc/rfc5891.txt).\n\n## Scheme Extendable\n\nURI.js supports inserting custom [scheme](http://en.wikipedia.org/wiki/URI_scheme) dependent processing rules. Currently, URI.js has built in support for the following schemes:\n\n*\thttp \\[[RFC 2616](http://www.ietf.org/rfc/rfc2616.txt)\\]\n*\thttps \\[[RFC 2818](http://www.ietf.org/rfc/rfc2818.txt)\\]\n*\tws \\[[RFC 6455](http://www.ietf.org/rfc/rfc6455.txt)\\]\n*\twss \\[[RFC 6455](http://www.ietf.org/rfc/rfc6455.txt)\\]\n*\tmailto \\[[RFC 6068](http://www.ietf.org/rfc/rfc6068.txt)\\]\n*\turn \\[[RFC 2141](http://www.ietf.org/rfc/rfc2141.txt)\\]\n*\turn:uuid \\[[RFC 4122](http://www.ietf.org/rfc/rfc4122.txt)\\]\n\n### HTTP/HTTPS Support\n\n\tURI.equal(\"HTTP://ABC.COM:80\", \"http://abc.com/\") === true\n\tURI.equal(\"https://abc.com\", \"HTTPS://ABC.COM:443/\") === true\n\n### WS/WSS Support\n\n\tURI.parse(\"wss://example.com/foo?bar=baz\");\n\t//returns:\n\t//{\n\t//\tscheme : \"wss\",\n\t//\thost: \"example.com\",\n\t//\tresourceName: \"/foo?bar=baz\",\n\t//\tsecure: true,\n\t//}\n\n\tURI.equal(\"WS://ABC.COM:80/chat#one\", \"ws://abc.com/chat\") === true\n\n### Mailto Support\n\n\tURI.parse(\"mailto:alpha@example.com,bravo@example.com?subject=SUBSCRIBE&body=Sign%20me%20up!\");\n\t//returns:\n\t//{\n\t//\tscheme : \"mailto\",\n\t//\tto : [\"alpha@example.com\", \"bravo@example.com\"],\n\t//\tsubject : \"SUBSCRIBE\",\n\t//\tbody : \"Sign me up!\"\n\t//}\n\n\tURI.serialize({\n\t\tscheme : \"mailto\",\n\t\tto : [\"alpha@example.com\"],\n\t\tsubject : \"REMOVE\",\n\t\tbody : \"Please remove me\",\n\t\theaders : {\n\t\t\tcc : \"charlie@example.com\"\n\t\t}\n\t}) === \"mailto:alpha@example.com?cc=charlie@example.com&subject=REMOVE&body=Please%20remove%20me\"\n\n### URN Support\n\n\tURI.parse(\"urn:example:foo\");\n\t//returns:\n\t//{\n\t//\tscheme : \"urn\",\n\t//\tnid : \"example\",\n\t//\tnss : \"foo\",\n\t//}\n\n#### URN UUID Support\n\n\tURI.parse(\"urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6\");\n\t//returns:\n\t//{\n\t//\tscheme : \"urn\",\n\t//\tnid : \"uuid\",\n\t//\tuuid : \"f81d4fae-7dec-11d0-a765-00a0c91e6bf6\",\n\t//}\n\n## Usage\n\nTo load in a browser, use the following tag:\n\n\t<script type=\"text/javascript\" src=\"uri-js/dist/es5/uri.all.min.js\"></script>\n\nTo load in a CommonJS/Module environment, first install with npm/yarn by running on the command line:\n\n\tnpm install uri-js\n\t# OR\n\tyarn add uri-js\n\nThen, in your code, load it using:\n\n\tconst URI = require(\"uri-js\");\n\nIf you are writing your code in ES6+ (ESNEXT) or TypeScript, you would load it using:\n\n\timport * as URI from \"uri-js\";\n\nOr you can load just what you need using named exports:\n\n\timport { parse, serialize, resolve, resolveComponents, normalize, equal, removeDotSegments, pctEncChar, pctDecChars, escapeComponent, unescapeComponent } from \"uri-js\";\n\n## Breaking changes\n\n### Breaking changes from 3.x\n\nURN parsing has been completely changed to better align with the specification. Scheme is now always `urn`, but has two new properties: `nid` which contains the Namspace Identifier, and `nss` which contains the Namespace Specific String. The `nss` property will be removed by higher order scheme handlers, such as the UUID URN scheme handler.\n\nThe UUID of a URN can now be found in the `uuid` property.\n\n### Breaking changes from 2.x\n\nURI validation has been removed as it was slow, exposed a vulnerabilty, and was generally not useful.\n\n### Breaking changes from 1.x\n\nThe `errors` array on parsed components is now an `error` string.\n","publish_time":1527285297365,"_cnpm_publish_time":1527285297365,"dist-tags":{"latest":"4.4.1"}}