Upper case a string. Also handles non-string entities, such as objects with a toString
property, numbers and booleans. Empty values (null
and undefined
) will come out as an empty string.
npm install upper-case --save
var upperCase = require('upper-case');
upperCase(null); //=> ""
upperCase('string'); //=> "STRING"
upperCase({ toString: function () { return 'test'; } }); //=> "TEST"
MIT