MCPcopy Create free account
hub / github.com/NomicFoundation/hardhat / snakeToCamelCase

Function snakeToCamelCase

packages/hardhat-utils/src/string.ts:50–52  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

48 * @returns The camelCase string.
49 */
50export function snakeToCamelCase(str: string): string {
51 return str.replace(/_./g, (match) => match.charAt(1).toUpperCase());
52}
53
54/**
55 * Converts a camelCase string to snake_case.

Callers 2

parseInlineConfigLineFunction · 0.90
string.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected