MCPcopy Create free account
hub / github.com/nodejs/node / snakeToCamel

Function snakeToCamel

deps/v8/tools/turbolizer/src/common/util.ts:5–11  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

3// found in the LICENSE file.
4
5export function snakeToCamel(str: string): string {
6 return str.toLowerCase().replace(/([-_][a-z])/g, group =>
7 group
8 .toUpperCase()
9 .replace('-', '')
10 .replace('_', ''));
11}
12
13export function camelize(obj: any): any {
14 if (Array.isArray(obj)) {

Callers 1

camelizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected