@newdash/newdash
Version:
javascript/typescript utility library
34 lines (33 loc) • 865 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.toUpper = void 0;
const toString_1 = __importDefault(require("./toString"));
/**
* Converts `string`, as a whole, to upper case just like
* [String#toUpperCase](https://mdn.io/toUpperCase).
*
* @since 5.12.0
* @category String
* @param value The string to convert.
* @returns Returns the upper cased string.
* @example
*
* ```js
* _.toUpper('--foo-bar--');
* // => '--FOO-BAR--'
*
* _.toUpper('fooBar');
* // => 'FOOBAR'
*
* _.toUpper('__foo_bar__');
* // => '__FOO_BAR__'
* ```
*/
function toUpper(value) {
return (0, toString_1.default)(value).toUpperCase();
}
exports.toUpper = toUpper;
exports.default = toUpper;