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

Function isPlaceholder

apps/sim/lib/pptx-renderer/model/xml-helpers.ts:6–18  ·  view source on GitHub ↗
(node: SafeXmlNode)

Source from the content-addressed store, hash-verified

4 * Check whether a shape-like node contains a placeholder definition.
5 */
6export function isPlaceholder(node: SafeXmlNode): boolean {
7 const nvSpPr = node.child('nvSpPr')
8 if (nvSpPr.exists()) {
9 const nvPr = nvSpPr.child('nvPr')
10 if (nvPr.child('ph').exists()) return true
11 }
12 const nvPicPr = node.child('nvPicPr')
13 if (nvPicPr.exists()) {
14 const nvPr = nvPicPr.child('nvPr')
15 if (nvPr.child('ph').exists()) return true
16 }
17 return false
18}
19
20/**
21 * Parse all attributes of a node into a local-name keyed map.

Callers 2

extractPlaceholdersFunction · 0.90

Calls 2

childMethod · 0.80
existsMethod · 0.80

Tested by

no test coverage detected