MCPcopy Create free account
hub / github.com/Effect-TS/effect / pascalCaseTransform

Function pascalCaseTransform

packages/effect/src/String.ts:1287–1291  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

1285const STRIP_REGEXP = /[^A-Z0-9]+/gi
1286
1287const pascalCaseTransform = (input: string): string => {
1288 const firstChar = input.charAt(0)
1289 const lowerChars = input.substring(1).toLowerCase()
1290 return `${firstChar.toUpperCase()}${lowerChars}`
1291}
1292
1293/**
1294 * Converts a string to PascalCase.

Callers 1

camelCaseTransformFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected