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.

45 lines
1.3 KiB

4 years ago
  1. # Param Case
  2. [![NPM version][npm-image]][npm-url]
  3. [![NPM downloads][downloads-image]][downloads-url]
  4. [![Build status][travis-image]][travis-url]
  5. [![Test coverage][coveralls-image]][coveralls-url]
  6. Param case a string.
  7. Supports Unicode (non-ASCII characters) and non-string entities, such as objects with a `toString` property, numbers and booleans. Empty values (`null` and `undefined`) will result in an empty string.
  8. ## Installation
  9. ```
  10. npm install param-case --save
  11. ```
  12. ## Usage
  13. ```javascript
  14. var paramCase = require('param-case')
  15. paramCase('string') //=> "string"
  16. paramCase('camelCase') //=> "camel-case"
  17. paramCase('sentence case') //=> "sentence-case"
  18. paramCase('MY STRING', 'tr') //=> "my-strıng"
  19. ```
  20. ## Typings
  21. Includes a [TypeScript definition](param-case.d.ts).
  22. ## License
  23. MIT
  24. [npm-image]: https://img.shields.io/npm/v/param-case.svg?style=flat
  25. [npm-url]: https://npmjs.org/package/param-case
  26. [downloads-image]: https://img.shields.io/npm/dm/param-case.svg?style=flat
  27. [downloads-url]: https://npmjs.org/package/param-case
  28. [travis-image]: https://img.shields.io/travis/blakeembrey/param-case.svg?style=flat
  29. [travis-url]: https://travis-ci.org/blakeembrey/param-case
  30. [coveralls-image]: https://img.shields.io/coveralls/blakeembrey/param-case.svg?style=flat
  31. [coveralls-url]: https://coveralls.io/r/blakeembrey/param-case?branch=master