UNPKG

yunlongzha_try_nodejs

Version:

try it

1 lines 14.7 kB
{"_id":"statuses","_rev":"32-3e982e897eb03904c898427ec1e5f057","name":"statuses","description":"HTTP status utility","dist-tags":{"latest":"1.2.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":"http://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":"http://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":"http://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":"http://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":"http://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":"http://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":"http://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":"http://registry.npmjs.org/statuses/-/statuses-1.2.1.tgz"},"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) // => 'Forbidden'\nstatus('403') // => 'Forbidden'\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### statuses/codes.json\n\n```js\nvar codes = require('statuses/codes.json');\n```\n\nThis is a JSON file of the status codes\ntaken from `require('http').STATUS_CODES`.\nThis is saved so that codes are consistent even in older node.js versions.\nFor example, `308` will be added in v0.12.\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 update\n# build codes.json\nnpm run build\n```\n\n[npm-image]: https://img.shields.io/npm/v/statuses.svg?style=flat\n[npm-url]: https://npmjs.org/package/statuses\n[node-version-image]: http://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat\n[node-version-url]: http://nodejs.org/download/\n[travis-image]: https://img.shields.io/travis/jshttp/statuses.svg?style=flat\n[travis-url]: https://travis-ci.org/jshttp/statuses\n[coveralls-image]: https://img.shields.io/coveralls/jshttp/statuses.svg?style=flat\n[coveralls-url]: https://coveralls.io/r/jshttp/statuses?branch=master\n[downloads-image]: http://img.shields.io/npm/dm/statuses.svg?style=flat\n[downloads-url]: https://npmjs.org/package/statuses\n","maintainers":[{"name":"jongleberry","email":"jonathanrichardong@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":"defunctzombie","email":"shtylman@gmail.com"}],"time":{"modified":"2015-05-07T23:44:18.448Z","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"},"homepage":"https://github.com/jshttp/statuses","repository":{"type":"git","url":"https://github.com/jshttp/statuses"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"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},"keywords":["http","status","code"],"_attachments":{},"_etag":"\"CTHNSRJIS75YP5ZNSOI02TNZF\""}