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