146 lines
7.4 KiB
JSON
146 lines
7.4 KiB
JSON
{
|
|
"_args": [
|
|
[
|
|
{
|
|
"raw": "statuses@>= 1.3.1 < 2",
|
|
"scope": null,
|
|
"escapedName": "statuses",
|
|
"name": "statuses",
|
|
"rawSpec": ">= 1.3.1 < 2",
|
|
"spec": ">=1.3.1 <2.0.0",
|
|
"type": "range"
|
|
},
|
|
"/Volumes/2009-SSD/GT2/GT2-iOS/node_modules/http-errors"
|
|
]
|
|
],
|
|
"_from": "statuses@>=1.3.1 <2.0.0",
|
|
"_id": "statuses@1.4.0",
|
|
"_inCache": true,
|
|
"_location": "/statuses",
|
|
"_nodeVersion": "6.11.4",
|
|
"_npmOperationalInternal": {
|
|
"host": "s3://npm-registry-packages",
|
|
"tmp": "tmp/statuses-1.4.0.tgz_1508525480889_0.6966120798606426"
|
|
},
|
|
"_npmUser": {
|
|
"name": "dougwilson",
|
|
"email": "doug@somethingdoug.com"
|
|
},
|
|
"_npmVersion": "5.4.2",
|
|
"_phantomChildren": {},
|
|
"_requested": {
|
|
"raw": "statuses@>= 1.3.1 < 2",
|
|
"scope": null,
|
|
"escapedName": "statuses",
|
|
"name": "statuses",
|
|
"rawSpec": ">= 1.3.1 < 2",
|
|
"spec": ">=1.3.1 <2.0.0",
|
|
"type": "range"
|
|
},
|
|
"_requiredBy": [
|
|
"/http-errors"
|
|
],
|
|
"_resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz",
|
|
"_shasum": "bb73d446da2796106efcc1b601a253d6c46bd087",
|
|
"_shrinkwrap": null,
|
|
"_spec": "statuses@>= 1.3.1 < 2",
|
|
"_where": "/Volumes/2009-SSD/GT2/GT2-iOS/node_modules/http-errors",
|
|
"bugs": {
|
|
"url": "https://github.com/jshttp/statuses/issues"
|
|
},
|
|
"contributors": [
|
|
{
|
|
"name": "Douglas Christopher Wilson",
|
|
"email": "doug@somethingdoug.com"
|
|
},
|
|
{
|
|
"name": "Jonathan Ong",
|
|
"email": "me@jongleberry.com",
|
|
"url": "http://jongleberry.com"
|
|
}
|
|
],
|
|
"dependencies": {},
|
|
"description": "HTTP status utility",
|
|
"devDependencies": {
|
|
"csv-parse": "1.2.4",
|
|
"eslint": "3.19.0",
|
|
"eslint-config-standard": "10.2.1",
|
|
"eslint-plugin-import": "2.8.0",
|
|
"eslint-plugin-markdown": "1.0.0-beta.6",
|
|
"eslint-plugin-node": "5.2.0",
|
|
"eslint-plugin-promise": "3.6.0",
|
|
"eslint-plugin-standard": "3.0.1",
|
|
"istanbul": "0.4.5",
|
|
"mocha": "1.21.5",
|
|
"raw-body": "2.3.2",
|
|
"stream-to-array": "2.3.0"
|
|
},
|
|
"directories": {},
|
|
"dist": {
|
|
"integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==",
|
|
"shasum": "bb73d446da2796106efcc1b601a253d6c46bd087",
|
|
"tarball": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz"
|
|
},
|
|
"engines": {
|
|
"node": ">= 0.6"
|
|
},
|
|
"files": [
|
|
"HISTORY.md",
|
|
"index.js",
|
|
"codes.json",
|
|
"LICENSE"
|
|
],
|
|
"gitHead": "f76682144d9f0ed2c726bf0a8c868a33e393a8e5",
|
|
"homepage": "https://github.com/jshttp/statuses#readme",
|
|
"keywords": [
|
|
"http",
|
|
"status",
|
|
"code"
|
|
],
|
|
"license": "MIT",
|
|
"maintainers": [
|
|
{
|
|
"name": "defunctzombie",
|
|
"email": "shtylman@gmail.com"
|
|
},
|
|
{
|
|
"name": "tjholowaychuk",
|
|
"email": "tj@vision-media.ca"
|
|
},
|
|
{
|
|
"name": "dougwilson",
|
|
"email": "doug@somethingdoug.com"
|
|
},
|
|
{
|
|
"name": "mscdex",
|
|
"email": "mscdex@mscdex.net"
|
|
},
|
|
{
|
|
"name": "fishrock123",
|
|
"email": "fishrock123@rocketmail.com"
|
|
},
|
|
{
|
|
"name": "jongleberry",
|
|
"email": "jonathanrichardong@gmail.com"
|
|
}
|
|
],
|
|
"name": "statuses",
|
|
"optionalDependencies": {},
|
|
"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\nThis module provides a list of status codes and messages sourced from\na few different projects:\n\n * The [IANA Status Code Registry](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml)\n * The [Node.js project](https://nodejs.org/)\n * The [NGINX project](https://www.nginx.com/)\n * The [Apache HTTP Server project](https://httpd.apache.org/)\n\n## Installation\n\nThis is a [Node.js](https://nodejs.org/en/) module available through the\n[npm registry](https://www.npmjs.com/). Installation is done using the\n[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):\n\n```sh\n$ npm install statuses\n```\n\n## API\n\n<!-- eslint-disable no-unused-vars -->\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\nappropriate `code` will be returned. Otherwise, an error will be thrown.\n\n<!-- eslint-disable no-undef -->\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.STATUS_CODES\n\nReturns an object which maps status codes to status messages, in\nthe same format as the\n[Node.js http module](https://nodejs.org/dist/latest/docs/api/http.html#http_http_status_codes).\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<!-- eslint-disable no-undef, no-unused-expressions -->\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\nlower-cased. `undefined` for invalid `status message`s.\n\n<!-- eslint-disable no-undef, no-unused-expressions -->\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<!-- eslint-disable no-undef, no-unused-expressions -->\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<!-- eslint-disable no-undef, no-unused-expressions -->\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<!-- eslint-disable no-undef, no-unused-expressions -->\n\n```js\nstatus.retry[501] // => undefined\nstatus.retry[503] // => true\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/node/v/statuses.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",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/jshttp/statuses.git"
|
|
},
|
|
"scripts": {
|
|
"build": "node scripts/build.js",
|
|
"fetch": "node scripts/fetch-apache.js && node scripts/fetch-iana.js && node scripts/fetch-nginx.js && node scripts/fetch-node.js",
|
|
"lint": "eslint --plugin markdown --ext js,md .",
|
|
"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"
|
|
},
|
|
"version": "1.4.0"
|
|
}
|