MCPcopy
hub / github.com/alibaba/lowcode-engine / capitalizeFirstLetter

Function capitalizeFirstLetter

packages/renderer-core/src/utils/common.ts:260–265  ·  view source on GitHub ↗
(word: string)

Source from the content-addressed store, hash-verified

258 * @returns string capitalized string
259 */
260export function capitalizeFirstLetter(word: string) {
261 if (!word || !isString(word) || word.length === 0) {
262 return word;
263 }
264 return word[0].toUpperCase() + word.slice(1);
265}
266
267/**
268 * check str passed in is a string type of not

Callers 2

BaseRendererClass · 0.90
common.test.tsFile · 0.90

Calls 1

isStringFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…