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.

50 lines
1.6 KiB

4 years ago
  1. # No 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. [![Greenkeeper badge](https://badges.greenkeeper.io/blakeembrey/no-case.svg)](https://greenkeeper.io/)
  7. Transform a string to lower space cased. Optional locale and replacement character supported.
  8. 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.
  9. ## Installation
  10. ```
  11. npm install no-case --save
  12. ```
  13. ## Usage
  14. ```javascript
  15. var noCase = require('no-case')
  16. noCase(null) //=> ""
  17. noCase('string') //=> "string"
  18. noCase('dot.case') //=> "dot case"
  19. noCase('camelCase') //=> "camel case"
  20. noCase('Beyoncé Knowles') //=> "beyoncé knowles"
  21. noCase('A STRING', 'tr') //=> "a strıng"
  22. noCase('HELLO WORLD!', null, '_') //=> "hello_world"
  23. ```
  24. ## Typings
  25. Includes a [TypeScript definition](no-case.d.ts).
  26. ## License
  27. MIT
  28. [npm-image]: https://img.shields.io/npm/v/no-case.svg?style=flat
  29. [npm-url]: https://npmjs.org/package/no-case
  30. [downloads-image]: https://img.shields.io/npm/dm/no-case.svg?style=flat
  31. [downloads-url]: https://npmjs.org/package/no-case
  32. [travis-image]: https://img.shields.io/travis/blakeembrey/no-case.svg?style=flat
  33. [travis-url]: https://travis-ci.org/blakeembrey/no-case
  34. [coveralls-image]: https://img.shields.io/coveralls/blakeembrey/no-case.svg?style=flat
  35. [coveralls-url]: https://coveralls.io/r/blakeembrey/no-case?branch=master