MCPcopy Create free account
hub / github.com/continuedev/continue / kebabOfStr

Function kebabOfStr

core/util/text.ts:41–46  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

39}
40
41export function kebabOfStr(str: string): string {
42 return str
43 .replace(/([a-z0-9])([A-Z])/g, "$1-$2") // handle camelCase, PascalCase, and numbers followed by uppercase
44 .replace(/[\s_]+/g, "-") // replace spaces and underscores with hyphens
45 .toLowerCase();
46}
47
48export function kebabOfThemeStr(str: string): string {
49 return str

Callers 1

text.vitest.tsFile · 0.90

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected