UNPKG

ts-prime

Version:

A utility library for JavaScript and Typescript.

16 lines (15 loc) 365 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Capitalize first letter of word * @param str - Any string * @signature * P.capitalize(str) * @example * P.capitalize("tom") //=> Tom * @category String */ function capitalize(str) { return str.charAt(0).toUpperCase() + str.slice(1); } exports.capitalize = capitalize;