{"_id":"@kamilkisiela/fast-url-parser","_rev":"4333949","name":"@kamilkisiela/fast-url-parser","description":"Extremely fast implementation of node core url library","dist-tags":{"latest":"1.1.4"},"maintainers":[{"name":"kamilkisiela","email":""}],"time":{"modified":"2026-04-08T00:07:23.000Z","created":"2023-12-05T15:49:10.959Z","1.1.4":"2023-12-05T15:49:10.959Z"},"users":{},"author":{"name":"Petka Antonov","email":"petka_antonov@hotmail.com","url":"http://github.com/petkaantonov/"},"repository":{"type":"git","url":"git://github.com/petkaantonov/urlparser.git"},"versions":{"1.1.4":{"name":"@kamilkisiela/fast-url-parser","description":"Extremely fast implementation of node core url library","version":"1.1.4","keywords":["fast","parse","parser","url","uri","performance"],"scripts":{"test":"npm run jshint && node ./test/index.js | tap-spec","dot":"node ./test/index.js | tap-dot","bench":"node ./benchmark/urlparser.js","bench-node":"node ./benchmark/nodecore.js","jshint":"jshint --verbose ./src/*"},"homepage":"https://github.com/petkaantonov/urlparser","repository":{"type":"git","url":"git://github.com/petkaantonov/urlparser.git"},"bugs":{"url":"http://github.com/petkaantonov/urlparser/issues"},"license":"MIT","author":{"name":"Petka Antonov","email":"petka_antonov@hotmail.com","url":"http://github.com/petkaantonov/"},"devDependencies":{"jshint":"^2.5.10","querystringparser":"^0.1.1","tap-dot":"^0.2.3","tap-spec":"^2.1.1","tape":"^3.0.3"},"main":"./src/urlparser.js","_id":"@kamilkisiela/fast-url-parser@1.1.4","gitHead":"545dcd3ecf148ac9e27a8910db54f9a6f74f441b","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"shasum":"9d68877a489107411b953c54ea65d0658b515809","size":13137,"noattachment":false,"key":"/@kamilkisiela/fast-url-parser/-/@kamilkisiela/fast-url-parser-1.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/@kamilkisiela/fast-url-parser/download/@kamilkisiela/fast-url-parser-1.1.4.tgz"},"_npmUser":{"name":"kamilkisiela","email":"kamil.kisiela@gmail.com"},"directories":{},"maintainers":[{"name":"kamilkisiela","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fast-url-parser_1.1.4_1701791350738_0.6304255541788437"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-12-05T15:49:10.959Z","publish_time":1701791350959,"_source_registry_name":"default","_cnpm_publish_time":1701791350959}},"readme":"#Introduction\n\nFast implementation of an url parser for node.js.\n\n#Quick start\n\n    npm install @kamilkisiela/fast-url-parser\n\n```js\nvar url = require(\"@kamilkisiela/fast-url-parser\");\n```\n\n#API\n\nThis module has exactly the same API and semantics as the `require(\"url\");`- module that comes with node.\n\nSee [Node.JS URL API documentation](http://nodejs.org/docs/latest/api/url.html).\n\nIn addition, you may inject a custom query string implementation by setting the `url.queryString` property. The module export object must expose the methods `.parse` and `.stringify`. By default the core `\"querystring\"` module is used.\n\nYou may disable automatic escaping of some characters when parsing an URL by passing `true` as a forth argument so that: `url.format(url.parse(yourUrl, false, false, true)) == yourUrl`\n\nExample:\n\n```js\nvar url = require(\"@kamilkisiela/fast-url-parser\");\n// the querystringparser module supports nested properties\nurl.queryString = require(\"querystringparser\");\nvar parsed = Url.parse('/path?user[name][first]=tj&user[name][last]=holowaychuk', true);\nconsole.log(parsed.query);\n//{ user: { name: { first: 'tj', last: 'holowaychuk' } } }\n```\n\nIf in your application you may want all modules use this parser automatically, you can do so by inserting this line at the beginning of your application:\n\n```js\nrequire(\"fast-url-parser\").replace();\n```\n\nAnything that now calls `require(\"url\")` will instead get an instance of this module instead of the url parser that comes with node core.\n\n#Performance\n\n    Petka Antonov@PETKAANTONOV-PC ~/urlparser (master)\n    $ node ./benchmark/urlparser.js\n    misc/url.js parse(): 340437.12\n    misc/url.js format(): 447742.86\n    misc/url.js resolve(\"../foo/bar?baz=boom\"): 415350.70\n    misc/url.js resolve(\"foo/bar\"): 437834.74\n    misc/url.js resolve(\"http://nodejs.org\"): 456145.28\n    misc/url.js resolve(\"./foo/bar?baz\"): 454950.19\n\n    Petka Antonov@PETKAANTONOV-PC ~/urlparser (master)\n    $ node ./benchmark/nodecore.js\n    misc/url.js parse(): 148739.92\n    misc/url.js format(): 117072.05\n    misc/url.js resolve(\"../foo/bar?baz=boom\"): 135131.15\n    misc/url.js resolve(\"foo/bar\"): 119247.59\n    misc/url.js resolve(\"http://nodejs.org\"): 131443.62\n    misc/url.js resolve(\"./foo/bar?baz\"): 131831.52\n\n#License\n\nMIT License:\n\n    Copyright (c) 2014 Petka Antonov\n\n    Permission is hereby granted, free of charge, to any person obtaining a copy\n    of this software and associated documentation files (the \"Software\"), to deal\n    in the Software without restriction, including without limitation the rights\n    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n    copies of the Software, and to permit persons to whom the Software is\n    furnished to do so, subject to the following conditions:\n\n    The above copyright notice and this permission notice shall be included in\n    all copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE\n    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n    THE SOFTWARE.\n","_attachments":{},"homepage":"https://github.com/petkaantonov/urlparser","bugs":{"url":"http://github.com/petkaantonov/urlparser/issues"},"license":"MIT"}