MCPcopy
hub / github.com/xaboy/form-create / toCase

Function toCase

packages/utils/lib/tocase.js:1–7  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

1export default function toCase(str) {
2 const to = str.replace(/(-[a-z])/g, function (v) {
3 return v.replace('-', '').toLocaleUpperCase();
4 });
5
6 return lower(to);
7}
8
9export function lower(str) {
10 return str.replace(str[0], str[0].toLowerCase());

Callers 9

updateTypeFunction · 0.85
toPropsFunction · 0.85
parserFunction · 0.85
componentFunction · 0.85
renderRuleFunction · 0.85
getParserFunction · 0.85
getTypeFunction · 0.85
parseEmitFunction · 0.85
emitEventFunction · 0.85

Calls 1

lowerFunction · 0.85

Tested by

no test coverage detected