You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.7KB

5 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # Methods
  2. [![NPM Version][npm-image]][npm-url]
  3. [![NPM Downloads][downloads-image]][downloads-url]
  4. [![Node.js Version][node-version-image]][node-version-url]
  5. [![Build Status][travis-image]][travis-url]
  6. [![Test Coverage][coveralls-image]][coveralls-url]
  7. HTTP verbs that Node.js core's HTTP parser supports.
  8. This module provides an export that is just like `http.METHODS` from Node.js core,
  9. with the following differences:
  10. * All method names are lower-cased.
  11. * Contains a fallback list of methods for Node.js versions that do not have a
  12. `http.METHODS` export (0.10 and lower).
  13. * Provides the fallback list when using tools like `browserify` without pulling
  14. in the `http` shim module.
  15. ## Install
  16. ```bash
  17. $ npm install methods
  18. ```
  19. ## API
  20. ```js
  21. var methods = require('methods')
  22. ```
  23. ### methods
  24. This is an array of lower-cased method names that Node.js supports. If Node.js
  25. provides the `http.METHODS` export, then this is the same array lower-cased,
  26. otherwise it is a snapshot of the verbs from Node.js 0.10.
  27. ## License
  28. [MIT](LICENSE)
  29. [npm-image]: https://img.shields.io/npm/v/methods.svg?style=flat
  30. [npm-url]: https://npmjs.org/package/methods
  31. [node-version-image]: https://img.shields.io/node/v/methods.svg?style=flat
  32. [node-version-url]: https://nodejs.org/en/download/
  33. [travis-image]: https://img.shields.io/travis/jshttp/methods.svg?style=flat
  34. [travis-url]: https://travis-ci.org/jshttp/methods
  35. [coveralls-image]: https://img.shields.io/coveralls/jshttp/methods.svg?style=flat
  36. [coveralls-url]: https://coveralls.io/r/jshttp/methods?branch=master
  37. [downloads-image]: https://img.shields.io/npm/dm/methods.svg?style=flat
  38. [downloads-url]: https://npmjs.org/package/methods