MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / pascal

Function pascal

javascript/selenium-webdriver/normalize_bidi_ast.mjs:65–72  ·  view source on GitHub ↗

PascalCase a field name for use in a synthetic type name.

(name)

Source from the content-addressed store, hash-verified

63
64/** PascalCase a field name for use in a synthetic type name. */
65function pascal(name) {
66 const cleaned = (name || '').replace(/[^A-Za-z0-9]/g, ' ')
67 return cleaned
68 .split(' ')
69 .filter(Boolean)
70 .map((p) => p.charAt(0).toUpperCase() + p.slice(1))
71 .join('')
72}
73
74/** Split a dotted CDDL name into `{ domain, local }` (domain '' when undotted). */
75function splitName(name) {

Callers 3

hoistInlineEnumsFunction · 0.85
hoistInlineRecordsFunction · 0.85
variantRecordFunction · 0.85

Calls 4

filterMethod · 0.80
splitMethod · 0.80
charAtMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected