MCPcopy Create free account
hub / github.com/bernaferrari/FigmaToCode / formatMultipleJSX

Function formatMultipleJSX

packages/backend/src/common/parseJSX.ts:36–43  ·  view source on GitHub ↗
(
  styles: Record<string, string | number | null>,
  isJsx: boolean,
)

Source from the content-addressed store, hash-verified

34 .map(([key, value]) => formatWithJSX(key, isJsx, value));
35
36export const formatMultipleJSX = (
37 styles: Record<string, string | number | null>,
38 isJsx: boolean,
39): string =>
40 Object.entries(styles)
41 .filter(([key, value]) => value)
42 .map(([key, value]) => formatWithJSX(key, isJsx, value!))
43 .join(isJsx ? ", " : "; ");
44
45export const escapeJSXText = (text: string): string => {
46 return encode(text, { level: "html5" })

Callers 1

getTextSegmentsMethod · 0.90

Calls 1

formatWithJSXFunction · 0.85

Tested by

no test coverage detected