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

Function pascal

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

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

(name)

Source from the content-addressed store, hash-verified

57
58/** PascalCase a field name for use in a synthetic type name. */
59function pascal(name) {
60 const cleaned = (name || '').replace(/[^A-Za-z0-9]/g, ' ')
61 return cleaned
62 .split(' ')
63 .filter(Boolean)
64 .map((p) => p.charAt(0).toUpperCase() + p.slice(1))
65 .join('')
66}
67
68/** Split a dotted CDDL name into `{ domain, local }` (domain '' when undotted). */
69function 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