wishthis/node_modules/ext/string_/capitalize.js

10 lines
216 B
JavaScript
Raw Normal View History

2022-08-31 14:34:36 +00:00
"use strict";
var ensureString = require("type/string/ensure");
module.exports = function () {
var input = ensureString(this);
if (!input) return input;
return input.charAt(0).toUpperCase() + input.slice(1);
};