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

Function kebabToCamel

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

Source from the content-addressed store, hash-verified

1import stringifyObject from 'stringify-object'
2
3export function kebabToCamel(str: string) {
4 return str.replace(/-([a-z])/g, (_, c) => c.toUpperCase())
5}
6
7export function camelToKebab(str: string) {
8 return str.replace(/[A-Z]/g, (match) => `-${match.toLowerCase()}`)

Callers 2

serializeCSSFunction · 0.90
string.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected