MCPcopy Index your code
hub / github.com/simstudioai/sim / flag

Function flag

apps/sim/lib/pptx-renderer/renderer/table-renderer.ts:66–76  ·  view source on GitHub ↗
(attrName: string, childName: string)

Source from the content-addressed store, hash-verified

64 // Style parts enabled only when tblPr has attribute "1" (or true); per spec default is off.
65 // pptxjs uses attrs only (firstCol === "1"); we also accept child elements for compatibility.
66 const flag = (attrName: string, childName: string): boolean => {
67 if (!tblPr) return false
68 const attr = tblPr.attr(attrName)
69 if (attr !== undefined) return attr === '1' || attr === 'true'
70 const ch = tblPr.child(childName)
71 if (ch.exists()) {
72 const val = ch.attr('val')
73 return val !== '0' && val !== 'false'
74 }
75 return false
76 }
77 const bandRow =
78 tblPr?.attr('bandRow') === '1' ||
79 tblPr?.attr('bandRow') === 'true' ||

Callers 1

getStyleSectionsFunction · 0.85

Calls 3

attrMethod · 0.80
childMethod · 0.80
existsMethod · 0.80

Tested by

no test coverage detected