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

Function toLine

packages/utils/lib/toline.js:1–6  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

1export default function toLine(name) {
2 let line = name.replace(/([A-Z])/g, '-$1').toLocaleLowerCase();
3 if (line.indexOf('-') === 0)
4 line = line.substr(1);
5 return line;
6}
7
8export function upper(str) {
9 return str.replace(str[0], str[0].toLocaleUpperCase());

Callers 4

_fnFunction · 0.90
useFunction · 0.85
setupFunction · 0.85
parseEmitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected