MCPcopy
hub / github.com/prisma/prisma / capitalize

Function capitalize

packages/client-common/src/casing.ts:4–8  ·  view source on GitHub ↗
(self: T)

Source from the content-addressed store, hash-verified

2 * Converts the first character of a word to upper case.
3 */
4export function capitalize<T extends string>(self: T): Capitalize<T> {
5 if (self.length === 0) return self as Capitalize<T>
6
7 return (self[0].toUpperCase() + self.slice(1)) as Capitalize<T>
8}
9
10/**
11 * Converts the first character of a word to lower case.

Callers 15

getAggregateNameFunction · 0.90
getGroupByNameFunction · 0.90
getAvgAggregateNameFunction · 0.90
getSumAggregateNameFunction · 0.90
getMinAggregateNameFunction · 0.90
getMaxAggregateNameFunction · 0.90
getGroupByPayloadNameFunction · 0.90
getAggregateArgsNameFunction · 0.90
getAggregateGetNameFunction · 0.90

Calls 1

sliceMethod · 0.45

Tested by

no test coverage detected