vlad 6f123ff03e 18.07 | %!s(int64=6) %!d(string=hai) anos | |
---|---|---|
.. | ||
LICENSE | %!s(int64=6) %!d(string=hai) anos | |
README.md | %!s(int64=6) %!d(string=hai) anos | |
package.json | %!s(int64=6) %!d(string=hai) anos | |
upper-case.d.ts | %!s(int64=6) %!d(string=hai) anos | |
upper-case.js | %!s(int64=6) %!d(string=hai) anos |
Upper case a string.
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.
npm install upper-case --save
var upperCase = require('upper-case')
upperCase(null) //=> ""
upperCase('string') //=> "STRING"
upperCase('string', 'tr') //=> "STRİNG"
upperCase({ toString: function () { return 'test' } }) //=> "TEST"
Includes a TypeScript definition.
MIT