{
  "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": "git://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"
  },
  "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",
  "readmeFilename": "README.md",
  "bugs": {
    "url": "https://github.com/jshttp/statuses/issues"
  },
  "homepage": "https://github.com/jshttp/statuses",
  "_id": "statuses@1.3.1",
  "_shasum": "faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e",
  "_from": "statuses@~1.3.1",
  "_resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz"
}
