MCPcopy Index your code
hub / github.com/cifertech/DisplayKit / safeFnNameFromTitle

Function safeFnNameFromTitle

app.js:2059–2067  ·  view source on GitHub ↗
(title)

Source from the content-addressed store, hash-verified

2057}
2058
2059function safeFnNameFromTitle(title) {
2060 const base = String(title || "Screen").replace(/[^a-zA-Z0-9]+/g, " ").trim();
2061 const camel = base
2062 .split(/\s+/g)
2063 .filter(Boolean)
2064 .map((w) => w.charAt(0).toUpperCase() + w.slice(1))
2065 .join("");
2066 return "draw" + (camel || "Screen");
2067}
2068
2069function createElementWithDefaults(type, overrides = {}) {
2070 const defaultStroke = getContrastingColor(bgColor);

Callers 1

renderUiExamplesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected