MCPcopy
hub / github.com/ionic-team/capacitor / getAllElements

Function getAllElements

cli/src/plugin.ts:216–226  ·  view source on GitHub ↗
(p: Plugin, platform: string, elementName: string)

Source from the content-addressed store, hash-verified

214 * For a given plugin, return all the plugin.xml elements with elementName, checking root and specified platform
215 */
216export function getAllElements(p: Plugin, platform: string, elementName: string): any {
217 let modules: string[] = [];
218 if (p.xml[elementName]) {
219 modules = modules.concat(p.xml[elementName]);
220 }
221 const platformModules = getPluginPlatform(p, platform);
222 if (platformModules?.[elementName]) {
223 modules = modules.concat(platformModules[elementName]);
224 }
225 return modules;
226}

Callers 6

installGradlePluginsFunction · 0.90
generateCordovaPodspecFunction · 0.90
getJSModulesFunction · 0.85
getAssetsFunction · 0.85

Calls 1

getPluginPlatformFunction · 0.85

Tested by

no test coverage detected