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

Function camelToKebabCase

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

Source from the content-addressed store, hash-verified

68 * @returns The kebab-case string.
69 */
70export function camelToKebabCase(str: string): string {
71 return str.replace(/[A-Z0-9]/g, (match) => `-${match.toLowerCase()}`);
72}
73
74/**
75 * Ensures a string ends with a slash.

Callers 2

toCommandLineOptionFunction · 0.90
string.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected