MCPcopy Create free account
hub / github.com/ecomfe/tempad-dev / camelToKebab

Function camelToKebab

packages/extension/utils/string.ts:7–9  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

5}
6
7export function camelToKebab(str: string) {
8 return str.replace(/[A-Z]/g, (match) => `-${match.toLowerCase()}`)
9}
10
11export function snakeToKebab(str: string) {
12 return str.replace(/_/g, '-').toLowerCase()

Callers 2

stringifyVueComponentFunction · 0.90
string.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected