yunlongzha_try_nodejs
Version:
try it
1 lines • 13.4 kB
JSON
{"_id":"parseurl","_rev":"30-f1e8948363208a95ba0ee63f49b00f67","name":"parseurl","description":"parse a url with memoization","dist-tags":{"latest":"1.3.0"},"versions":{"1.0.0":{"name":"parseurl","description":"parse a url with memoization","version":"1.0.0","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/expressjs/parseurl.git"},"bugs":{"url":"https://github.com/expressjs/parseurl/issues","email":"me@jongleberry.com"},"license":"MIT","homepage":"https://github.com/expressjs/parseurl","_id":"parseurl@1.0.0","dist":{"shasum":"060280cfeecd8788fec6459ca0cc5df218477fe4","tarball":"http://registry.npmjs.org/parseurl/-/parseurl-1.0.0.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"directories":{}},"1.0.1":{"name":"parseurl","description":"parse a url with memoization","version":"1.0.1","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/expressjs/parseurl.git"},"bugs":{"url":"https://github.com/expressjs/parseurl/issues","email":"me@jongleberry.com"},"license":"MIT","homepage":"https://github.com/expressjs/parseurl","_id":"parseurl@1.0.1","dist":{"shasum":"2e57dce6efdd37c3518701030944c22bf388b7b4","tarball":"http://registry.npmjs.org/parseurl/-/parseurl-1.0.1.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"directories":{}},"1.1.0":{"name":"parseurl","description":"parse a url with memoization","version":"1.1.0","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/expressjs/parseurl.git"},"bugs":{"url":"https://github.com/expressjs/parseurl/issues","email":"me@jongleberry.com"},"license":"MIT","homepage":"https://github.com/expressjs/parseurl","_id":"parseurl@1.1.0","dist":{"shasum":"b389c827d9426b4d8698ef45eaf14f1b63596371","tarball":"http://registry.npmjs.org/parseurl/-/parseurl-1.1.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"shtylman","email":"shtylman@gmail.com"},{"name":"dougwilson","email":"doug@somethingdoug.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"mscdex","email":"mscdex@mscdex.net"},{"name":"fishrock123","email":"fishrock123@rocketmail.com"}],"directories":{}},"1.1.1":{"name":"parseurl","description":"parse a url with memoization","version":"1.1.1","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/expressjs/parseurl.git"},"bugs":{"url":"https://github.com/expressjs/parseurl/issues","email":"me@jongleberry.com"},"license":"MIT","homepage":"https://github.com/expressjs/parseurl","_id":"parseurl@1.1.1","dist":{"shasum":"3b8fdb423aeb18c997dcdf9ac9ecd7f037b3500a","tarball":"http://registry.npmjs.org/parseurl/-/parseurl-1.1.1.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"shtylman","email":"shtylman@gmail.com"},{"name":"dougwilson","email":"doug@somethingdoug.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"mscdex","email":"mscdex@mscdex.net"},{"name":"fishrock123","email":"fishrock123@rocketmail.com"}],"directories":{}},"1.1.2":{"name":"parseurl","description":"parse a url with memoization","version":"1.1.2","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/expressjs/parseurl.git"},"bugs":{"url":"https://github.com/expressjs/parseurl/issues","email":"me@jongleberry.com"},"license":"MIT","homepage":"https://github.com/expressjs/parseurl","_id":"parseurl@1.1.2","dist":{"shasum":"d3294c91119d19885e586fcc871b90d2006eb006","tarball":"http://registry.npmjs.org/parseurl/-/parseurl-1.1.2.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"shtylman","email":"shtylman@gmail.com"},{"name":"dougwilson","email":"doug@somethingdoug.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"mscdex","email":"mscdex@mscdex.net"},{"name":"fishrock123","email":"fishrock123@rocketmail.com"}],"directories":{}},"1.1.3":{"name":"parseurl","description":"parse a url with memoization","version":"1.1.3","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/expressjs/parseurl.git"},"bugs":{"url":"https://github.com/expressjs/parseurl/issues","email":"me@jongleberry.com"},"license":"MIT","homepage":"https://github.com/expressjs/parseurl","_id":"parseurl@1.1.3","dist":{"shasum":"1f005738ac71b417bc2d0845cbdfa2a8b63ea639","tarball":"http://registry.npmjs.org/parseurl/-/parseurl-1.1.3.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"shtylman","email":"shtylman@gmail.com"},{"name":"dougwilson","email":"doug@somethingdoug.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"mscdex","email":"mscdex@mscdex.net"},{"name":"fishrock123","email":"fishrock123@rocketmail.com"}],"directories":{}},"1.2.0":{"name":"parseurl","description":"parse a url with memoization","version":"1.2.0","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"contributors":[{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"}],"repository":{"type":"git","url":"git://github.com/expressjs/parseurl"},"license":"MIT","devDependencies":{"benchmark":"1.0.0","beautify-benchmark":"0.2.4","fast-url-parser":"~1.0.0","istanbul":"0.3.0","mocha":"~1.20.0"},"scripts":{"bench":"node benchmark/index.js","test":"mocha --check-leaks --bail --reporter spec test/","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot test/","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec test/"},"bugs":{"url":"https://github.com/expressjs/parseurl/issues"},"homepage":"https://github.com/expressjs/parseurl","_id":"parseurl@1.2.0","dist":{"shasum":"be7df2d698eb49ffb10ea62939693e152991c008","tarball":"http://registry.npmjs.org/parseurl/-/parseurl-1.2.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"shtylman","email":"shtylman@gmail.com"},{"name":"dougwilson","email":"doug@somethingdoug.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"mscdex","email":"mscdex@mscdex.net"},{"name":"fishrock123","email":"fishrock123@rocketmail.com"}],"directories":{}},"1.3.0":{"name":"parseurl","description":"parse a url with memoization","version":"1.3.0","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"contributors":[{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"}],"repository":{"type":"git","url":"https://github.com/expressjs/parseurl"},"license":"MIT","devDependencies":{"benchmark":"1.0.0","beautify-benchmark":"0.2.4","fast-url-parser":"~1.0.0","istanbul":"0.3.0","mocha":"~1.21.4"},"scripts":{"bench":"node benchmark/index.js","test":"mocha --check-leaks --bail --reporter spec test/","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot test/","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec test/"},"gitHead":"03b7ccca240e2bef5df6c25797e99175d28fb2cb","bugs":{"url":"https://github.com/expressjs/parseurl/issues"},"homepage":"https://github.com/expressjs/parseurl","_id":"parseurl@1.3.0","_shasum":"b58046db4223e145afa76009e61bac87cc2281b3","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"shtylman","email":"shtylman@gmail.com"},{"name":"dougwilson","email":"doug@somethingdoug.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"mscdex","email":"mscdex@mscdex.net"},{"name":"fishrock123","email":"fishrock123@rocketmail.com"}],"dist":{"shasum":"b58046db4223e145afa76009e61bac87cc2281b3","tarball":"http://registry.npmjs.org/parseurl/-/parseurl-1.3.0.tgz"},"directories":{}}},"readme":"# parseurl\n\n[](http://badge.fury.io/js/parseurl)\n[](https://travis-ci.org/expressjs/parseurl)\n[](https://coveralls.io/r/expressjs/parseurl)\n\nParse a URL with memoization.\n\n## Install\n\n```bash\n$ npm install parseurl\n```\n\n## API\n\n```js\nvar parseurl = require('parseurl')\n```\n\n### parseurl(req)\n\nParse the URL of the given request object (looks at the `req.url` property)\nand return the result. The result is the same as `url.parse` in Node.js core.\nCalling this function multiple times on the same `req` where `req.url` does\nnot change will return a cached parsed object, rather than parsing again.\n\n### parseurl.original(req)\n\nParse the original URL of the given request object and return the result.\nThis works by trying to parse `req.originalUrl` if it is a string, otherwise\nparses `req.url`. The result is the same as `url.parse` in Node.js core.\nCalling this function multiple times on the same `req` where `req.originalUrl`\ndoes not change will return a cached parsed object, rather than parsing again.\n\n## Benchmark\n\n```bash\n$ npm run-script bench\n\n> parseurl@1.3.0 bench nodejs-parseurl\n> node benchmark/index.js\n\n> node benchmark/fullurl.js\n\n Parsing URL \"http://localhost:8888/foo/bar?user=tj&pet=fluffy\"\n\n 1 test completed.\n 2 tests completed.\n 3 tests completed.\n\n fasturl x 1,290,780 ops/sec ±0.46% (195 runs sampled)\n nativeurl x 56,401 ops/sec ±0.22% (196 runs sampled)\n parseurl x 55,231 ops/sec ±0.22% (194 runs sampled)\n\n> node benchmark/pathquery.js\n\n Parsing URL \"/foo/bar?user=tj&pet=fluffy\"\n\n 1 test completed.\n 2 tests completed.\n 3 tests completed.\n\n fasturl x 1,986,668 ops/sec ±0.27% (190 runs sampled)\n nativeurl x 98,740 ops/sec ±0.21% (195 runs sampled)\n parseurl x 2,628,171 ops/sec ±0.36% (195 runs sampled)\n\n> node benchmark/samerequest.js\n\n Parsing URL \"/foo/bar?user=tj&pet=fluffy\" on same request object\n\n 1 test completed.\n 2 tests completed.\n 3 tests completed.\n\n fasturl x 2,184,468 ops/sec ±0.40% (194 runs sampled)\n nativeurl x 99,437 ops/sec ±0.71% (194 runs sampled)\n parseurl x 10,498,005 ops/sec ±0.61% (186 runs sampled)\n\n> node benchmark/simplepath.js\n\n Parsing URL \"/foo/bar\"\n\n 1 test completed.\n 2 tests completed.\n 3 tests completed.\n\n fasturl x 4,535,825 ops/sec ±0.27% (191 runs sampled)\n nativeurl x 98,769 ops/sec ±0.54% (191 runs sampled)\n parseurl x 4,164,865 ops/sec ±0.34% (192 runs sampled)\n\n> node benchmark/slash.js\n\n Parsing URL \"/\"\n\n 1 test completed.\n 2 tests completed.\n 3 tests completed.\n\n fasturl x 4,908,405 ops/sec ±0.42% (191 runs sampled)\n nativeurl x 100,945 ops/sec ±0.59% (188 runs sampled)\n parseurl x 4,333,208 ops/sec ±0.27% (194 runs sampled)\n```\n\n## License\n\n [MIT](LICENSE)\n","maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"dougwilson","email":"doug@somethingdoug.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"mscdex","email":"mscdex@mscdex.net"},{"name":"fishrock123","email":"fishrock123@rocketmail.com"},{"name":"defunctzombie","email":"shtylman@gmail.com"}],"time":{"modified":"2015-05-07T23:32:18.899Z","created":"2014-03-08T02:08:58.819Z","1.0.0":"2014-03-08T02:08:58.819Z","1.0.1":"2014-03-08T02:11:05.583Z","1.1.0":"2014-07-09T02:22:48.887Z","1.1.1":"2014-07-09T05:05:40.824Z","1.1.2":"2014-07-09T05:18:03.016Z","1.1.3":"2014-07-09T05:25:36.837Z","1.2.0":"2014-07-21T19:12:21.102Z","1.3.0":"2014-08-10T02:54:41.099Z"},"homepage":"https://github.com/expressjs/parseurl","repository":{"type":"git","url":"https://github.com/expressjs/parseurl"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"bugs":{"url":"https://github.com/expressjs/parseurl/issues"},"license":"MIT","readmeFilename":"README.md","contributors":[{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"}],"users":{"goodseller":true,"simplyianm":true,"qqqppp9998":true,"princetoad":true,"pandao":true,"aredridel":true,"kankungyip":true},"_attachments":{},"_etag":"\"3IO6GBPLFIPTZ9ZHNYDYLOD0M\""}