IOTConnect-Web/node_modules/ext/string_/capitalize.js

10 lines
216 B
JavaScript
Raw Normal View History

2024-05-09 01:49:52 +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);
};