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. # Lower 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. Lower 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 lower-case --save
  11. ```
  12. ## Usage
  13. ```js
  14. var lowerCase = require('lower-case')
  15. lowerCase(null) //=> ""
  16. lowerCase('STRING') //=> "string"
  17. lowerCase('STRING', 'tr') //=> "strıng"
  18. lowerCase({ toString: function () { return 'TEST' } }) //=> "test"
  19. ```
  20. ## Typings
  21. Includes a [TypeScript definition](lower-case.d.ts).
  22. ## License
  23. MIT
  24. [npm-image]: https://img.shields.io/npm/v/lower-case.svg?style=flat
  25. [npm-url]: https://npmjs.org/package/lower-case
  26. [downloads-image]: https://img.shields.io/npm/dm/lower-case.svg?style=flat
  27. [downloads-url]: https://npmjs.org/package/lower-case
  28. [travis-image]: https://img.shields.io/travis/blakeembrey/lower-case.svg?style=flat
  29. [travis-url]: https://travis-ci.org/blakeembrey/lower-case
  30. [coveralls-image]: https://img.shields.io/coveralls/blakeembrey/lower-case.svg?style=flat
  31. [coveralls-url]: https://coveralls.io/r/blakeembrey/lower-case?branch=master