1 line
18 KiB
JSON
1 line
18 KiB
JSON
{"_id":"statuses","_rev":"48-3d9e117077a2416e22fe1f85a5d1023e","name":"statuses","description":"HTTP status utility","dist-tags":{"latest":"1.3.1"},"versions":{"1.0.1":{"name":"statuses","description":"HTTP status utility","version":"1.0.1","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/expressjs/statuses.git"},"bugs":{"url":"https://github.com/expressjs/statuses/issues","email":"me@jongleberry.com"},"license":"MIT","homepage":"https://github.com/expressjs/statuses","_id":"statuses@1.0.1","dist":{"shasum":"e6e059e1bc769dfccd80fe7e9901a20a48b8ce9a","tarball":"https://registry.npmjs.org/statuses/-/statuses-1.0.1.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"directories":{}},"1.0.2":{"name":"statuses","description":"HTTP status utility","version":"1.0.2","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/expressjs/statuses.git"},"bugs":{"url":"https://github.com/expressjs/statuses/issues","email":"me@jongleberry.com"},"license":"MIT","homepage":"https://github.com/expressjs/statuses","_id":"statuses@1.0.2","dist":{"shasum":"6e8a73c2fb0886f5eecf78e0aa2a1b9ae92ab73b","tarball":"https://registry.npmjs.org/statuses/-/statuses-1.0.2.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"directories":{}},"1.0.3":{"name":"statuses","description":"HTTP status utility","version":"1.0.3","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/expressjs/statuses.git"},"bugs":{"url":"https://github.com/expressjs/statuses/issues","email":"me@jongleberry.com"},"license":"MIT","homepage":"https://github.com/expressjs/statuses","_id":"statuses@1.0.3","_shasum":"a7d9bfb30bce92281bdba717ceb9db10d8640afb","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"dougwilson","email":"doug@somethingdoug.com"},{"name":"shtylman","email":"shtylman@gmail.com"},{"name":"mscdex","email":"mscdex@mscdex.net"},{"name":"fishrock123","email":"fishrock123@rocketmail.com"}],"dist":{"shasum":"a7d9bfb30bce92281bdba717ceb9db10d8640afb","tarball":"https://registry.npmjs.org/statuses/-/statuses-1.0.3.tgz"},"directories":{}},"1.0.4":{"name":"statuses","description":"HTTP status utility","version":"1.0.4","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/jshttp/statuses"},"license":"MIT","keywords":["http","status","code"],"files":["index.js"],"gitHead":"0315a85435546839b4bcafaf5c1e6ac2acab660a","bugs":{"url":"https://github.com/jshttp/statuses/issues"},"homepage":"https://github.com/jshttp/statuses","_id":"statuses@1.0.4","scripts":{},"_shasum":"a8b203f645cf475a66426f6be690205c85f3ebdd","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"dougwilson","email":"doug@somethingdoug.com"},{"name":"shtylman","email":"shtylman@gmail.com"},{"name":"mscdex","email":"mscdex@mscdex.net"},{"name":"fishrock123","email":"fishrock123@rocketmail.com"}],"dist":{"shasum":"a8b203f645cf475a66426f6be690205c85f3ebdd","tarball":"https://registry.npmjs.org/statuses/-/statuses-1.0.4.tgz"},"directories":{}},"1.1.0":{"name":"statuses","description":"HTTP status utility","version":"1.1.0","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/jshttp/statuses"},"license":"MIT","keywords":["http","status","code"],"files":["index.js","codes.json","LICENSE"],"devDependencies":{"mocha":"1","istanbul":"0"},"scripts":{"update":"node update.js","test":"mocha --reporter spec --bail --check-leaks","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks"},"gitHead":"4d540d3e25368b97d1410bf8bd5637a5c9e20ce8","bugs":{"url":"https://github.com/jshttp/statuses/issues"},"homepage":"https://github.com/jshttp/statuses","_id":"statuses@1.1.0","_shasum":"937882caad053f8d808d845b333cfab9def03222","_from":".","_npmVersion":"2.0.2","_nodeVersion":"0.11.13","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"dougwilson","email":"doug@somethingdoug.com"},{"name":"shtylman","email":"shtylman@gmail.com"},{"name":"mscdex","email":"mscdex@mscdex.net"},{"name":"fishrock123","email":"fishrock123@rocketmail.com"}],"dist":{"shasum":"937882caad053f8d808d845b333cfab9def03222","tarball":"https://registry.npmjs.org/statuses/-/statuses-1.1.0.tgz"},"directories":{}},"1.1.1":{"name":"statuses","description":"HTTP status utility","version":"1.1.1","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/jshttp/statuses"},"license":"MIT","keywords":["http","status","code"],"files":["index.js","codes.json","LICENSE"],"devDependencies":{"mocha":"1","istanbul":"0"},"scripts":{"update":"node update.js","test":"mocha --reporter spec --bail --check-leaks","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks"},"gitHead":"9b775578df2b528c377f53f3ed3cfa03da4d1274","bugs":{"url":"https://github.com/jshttp/statuses/issues"},"homepage":"https://github.com/jshttp/statuses","_id":"statuses@1.1.1","_shasum":"10d1811e1bd3182ea3f566bf6b4745cf8edee6cc","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"dougwilson","email":"doug@somethingdoug.com"},{"name":"shtylman","email":"shtylman@gmail.com"},{"name":"mscdex","email":"mscdex@mscdex.net"},{"name":"fishrock123","email":"fishrock123@rocketmail.com"}],"dist":{"shasum":"10d1811e1bd3182ea3f566bf6b4745cf8edee6cc","tarball":"https://registry.npmjs.org/statuses/-/statuses-1.1.1.tgz"},"directories":{}},"1.2.0":{"name":"statuses","description":"HTTP status utility","version":"1.2.0","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/jshttp/statuses"},"license":"MIT","keywords":["http","status","code"],"files":["index.js","codes.json","LICENSE"],"devDependencies":{"csv-parse":"0.0.6","istanbul":"0","mocha":"1","request":"^2.44.0","stream-to-array":"^2.0.2"},"scripts":{"build":"node scripts/build.js","update":"node scripts/update.js","test":"mocha --reporter spec --bail --check-leaks","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks"},"gitHead":"64dc7753f28f0302e4140602e36f0e270ddbb1bd","bugs":{"url":"https://github.com/jshttp/statuses/issues"},"homepage":"https://github.com/jshttp/statuses","_id":"statuses@1.2.0","_shasum":"4445790d65bec29184f50d54810f67e290c1679e","_from":".","_npmVersion":"2.0.2","_nodeVersion":"0.11.14","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"dougwilson","email":"doug@somethingdoug.com"},{"name":"shtylman","email":"shtylman@gmail.com"},{"name":"mscdex","email":"mscdex@mscdex.net"},{"name":"fishrock123","email":"fishrock123@rocketmail.com"}],"dist":{"shasum":"4445790d65bec29184f50d54810f67e290c1679e","tarball":"https://registry.npmjs.org/statuses/-/statuses-1.2.0.tgz"},"directories":{}},"1.2.1":{"name":"statuses","description":"HTTP status utility","version":"1.2.1","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/jshttp/statuses"},"license":"MIT","keywords":["http","status","code"],"files":["index.js","codes.json","LICENSE"],"devDependencies":{"csv-parse":"0.0.6","istanbul":"0","mocha":"1","stream-to-array":"2"},"scripts":{"build":"node scripts/build.js","update":"node scripts/update.js","test":"mocha --reporter spec --bail --check-leaks","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks"},"gitHead":"49e6ac7ae4c63ee8186f56cb52112a7eeda28ed7","bugs":{"url":"https://github.com/jshttp/statuses/issues"},"homepage":"https://github.com/jshttp/statuses","_id":"statuses@1.2.1","_shasum":"dded45cc18256d51ed40aec142489d5c61026d28","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"dougwilson","email":"doug@somethingdoug.com"},{"name":"shtylman","email":"shtylman@gmail.com"},{"name":"mscdex","email":"mscdex@mscdex.net"},{"name":"fishrock123","email":"fishrock123@rocketmail.com"}],"dist":{"shasum":"dded45cc18256d51ed40aec142489d5c61026d28","tarball":"https://registry.npmjs.org/statuses/-/statuses-1.2.1.tgz"},"directories":{}},"1.3.0":{"name":"statuses","description":"HTTP status utility","version":"1.3.0","contributors":[{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"},{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"}],"repository":{"type":"git","url":"https://github.com/jshttp/statuses"},"license":"MIT","keywords":["http","status","code"],"files":["HISTORY.md","index.js","codes.json","LICENSE"],"devDependencies":{"csv-parse":"1.0.1","eslint":"2.10.2","eslint-config-standard":"5.3.1","eslint-plugin-promise":"1.1.0","eslint-plugin-standard":"1.3.2","istanbul":"0.4.3","mocha":"1.21.5","stream-to-array":"2.2.0"},"engines":{"node":">= 0.6"},"scripts":{"build":"node scripts/build.js","fetch":"node scripts/fetch.js","lint":"eslint **/*.js","test":"mocha --reporter spec --check-leaks --bail test/","test-ci":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/","update":"npm run fetch && npm run build"},"gitHead":"b3e31e8c32dd8107e898b44b8c0b2dfff3cba495","bugs":{"url":"https://github.com/jshttp/statuses/issues"},"homepage":"https://github.com/jshttp/statuses","_id":"statuses@1.3.0","_shasum":"8e55758cb20e7682c1f4fce8dcab30bf01d1e07a","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"maintainers":[{"name":"defunctzombie","email":"shtylman@gmail.com"},{"name":"dougwilson","email":"doug@somethingdoug.com"},{"name":"fishrock123","email":"fishrock123@rocketmail.com"},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"mscdex","email":"mscdex@mscdex.net"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"dist":{"shasum":"8e55758cb20e7682c1f4fce8dcab30bf01d1e07a","tarball":"https://registry.npmjs.org/statuses/-/statuses-1.3.0.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/statuses-1.3.0.tgz_1463517875633_0.19560232176445425"},"directories":{}},"1.3.1":{"name":"statuses","description":"HTTP status utility","version":"1.3.1","contributors":[{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"},{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"}],"repository":{"type":"git","url":"https://github.com/jshttp/statuses"},"license":"MIT","keywords":["http","status","code"],"files":["HISTORY.md","index.js","codes.json","LICENSE"],"devDependencies":{"csv-parse":"1.1.7","eslint":"3.10.0","eslint-config-standard":"6.2.1","eslint-plugin-promise":"3.3.2","eslint-plugin-standard":"2.0.1","istanbul":"0.4.5","mocha":"1.21.5","stream-to-array":"2.3.0"},"engines":{"node":">= 0.6"},"scripts":{"build":"node scripts/build.js","fetch":"node scripts/fetch.js","lint":"eslint .","test":"mocha --reporter spec --check-leaks --bail test/","test-ci":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/","update":"npm run fetch && npm run build"},"gitHead":"28a619be77f5b4741e6578a5764c5b06ec6d4aea","bugs":{"url":"https://github.com/jshttp/statuses/issues"},"homepage":"https://github.com/jshttp/statuses","_id":"statuses@1.3.1","_shasum":"faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"maintainers":[{"name":"defunctzombie","email":"shtylman@gmail.com"},{"name":"dougwilson","email":"doug@somethingdoug.com"},{"name":"fishrock123","email":"fishrock123@rocketmail.com"},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"mscdex","email":"mscdex@mscdex.net"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"dist":{"shasum":"faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e","tarball":"https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/statuses-1.3.1.tgz_1478923281491_0.5574048184789717"},"directories":{}}},"readme":"# Statuses\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n[![Node.js Version][node-version-image]][node-version-url]\n[![Build Status][travis-image]][travis-url]\n[![Test Coverage][coveralls-image]][coveralls-url]\n\nHTTP status utility for node.\n\n## API\n\n```js\nvar status = require('statuses')\n```\n\n### var code = status(Integer || String)\n\nIf `Integer` or `String` is a valid HTTP code or status message, then the appropriate `code` will be returned. Otherwise, an error will be thrown.\n\n```js\nstatus(403) // => 403\nstatus('403') // => 403\nstatus('forbidden') // => 403\nstatus('Forbidden') // => 403\nstatus(306) // throws, as it's not supported by node.js\n```\n\n### status.codes\n\nReturns an array of all the status codes as `Integer`s.\n\n### var msg = status[code]\n\nMap of `code` to `status message`. `undefined` for invalid `code`s.\n\n```js\nstatus[404] // => 'Not Found'\n```\n\n### var code = status[msg]\n\nMap of `status message` to `code`. `msg` can either be title-cased or lower-cased. `undefined` for invalid `status message`s.\n\n```js\nstatus['not found'] // => 404\nstatus['Not Found'] // => 404\n```\n\n### status.redirect[code]\n\nReturns `true` if a status code is a valid redirect status.\n\n```js\nstatus.redirect[200] // => undefined\nstatus.redirect[301] // => true\n```\n\n### status.empty[code]\n\nReturns `true` if a status code expects an empty body.\n\n```js\nstatus.empty[200] // => undefined\nstatus.empty[204] // => true\nstatus.empty[304] // => true\n```\n\n### status.retry[code]\n\nReturns `true` if you should retry the rest.\n\n```js\nstatus.retry[501] // => undefined\nstatus.retry[503] // => true\n```\n\n## Adding Status Codes\n\nThe status codes are primarily sourced from http://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv.\nAdditionally, custom codes are added from http://en.wikipedia.org/wiki/List_of_HTTP_status_codes.\nThese are added manually in the `lib/*.json` files.\nIf you would like to add a status code, add it to the appropriate JSON file.\n\nTo rebuild `codes.json`, run the following:\n\n```bash\n# update src/iana.json\nnpm run fetch\n# build codes.json\nnpm run build\n```\n\n[npm-image]: https://img.shields.io/npm/v/statuses.svg\n[npm-url]: https://npmjs.org/package/statuses\n[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg\n[node-version-url]: https://nodejs.org/en/download\n[travis-image]: https://img.shields.io/travis/jshttp/statuses.svg\n[travis-url]: https://travis-ci.org/jshttp/statuses\n[coveralls-image]: https://img.shields.io/coveralls/jshttp/statuses.svg\n[coveralls-url]: https://coveralls.io/r/jshttp/statuses?branch=master\n[downloads-image]: https://img.shields.io/npm/dm/statuses.svg\n[downloads-url]: https://npmjs.org/package/statuses\n","maintainers":[{"email":"shtylman@gmail.com","name":"defunctzombie"},{"email":"tj@vision-media.ca","name":"tjholowaychuk"},{"email":"doug@somethingdoug.com","name":"dougwilson"},{"email":"mscdex@mscdex.net","name":"mscdex"},{"email":"fishrock123@rocketmail.com","name":"fishrock123"},{"email":"jonathanrichardong@gmail.com","name":"jongleberry"}],"time":{"modified":"2017-05-22T14:35:43.501Z","created":"2014-03-13T01:21:33.978Z","1.0.1":"2014-03-13T01:21:33.978Z","1.0.2":"2014-03-14T19:13:18.390Z","1.0.3":"2014-06-09T07:25:34.449Z","1.0.4":"2014-08-21T08:55:36.731Z","1.1.0":"2014-09-22T00:42:03.183Z","1.1.1":"2014-09-25T00:25:01.485Z","1.2.0":"2014-09-29T04:11:14.857Z","1.2.1":"2015-02-01T23:52:50.008Z","1.3.0":"2016-05-17T20:44:38.170Z","1.3.1":"2016-11-12T04:01:23.592Z"},"homepage":"https://github.com/jshttp/statuses","repository":{"type":"git","url":"https://github.com/jshttp/statuses"},"bugs":{"url":"https://github.com/jshttp/statuses/issues"},"license":"MIT","readmeFilename":"README.md","users":{"tunnckocore":true,"mimmo1":true,"darkowlzz":true,"docksteaderluke":true,"goodseller":true,"maximilianschmitt":true,"j3kz":true,"h0ward":true,"unboundev":true,"igorissen":true,"cwagner":true,"mojaray2k":true,"kodekracker":true,"nickeltobias":true,"ziflex":true,"jota":true,"wangnan0610":true,"quafoo":true},"keywords":["http","status","code"],"contributors":[{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"},{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"}],"_attachments":{},"_etag":"W/\"5922f73f-4938\"","_lastModified":"Mon, 22 May 2017 14:35:43 GMT","_cached":true} |