MCPcopy
hub / github.com/BuilderIO/mitosis / getComponentsUsed

Function getComponentsUsed

packages/core/src/helpers/get-components-used.ts:5–15  ·  view source on GitHub ↗
(json: MitosisComponent)

Source from the content-addressed store, hash-verified

3import { isMitosisNode } from './is-mitosis-node';
4
5export function getComponentsUsed(json: MitosisComponent) {
6 const components = new Set<string>();
7
8 traverse(json).forEach(function (item) {
9 if (isMitosisNode(item)) {
10 components.add(item.name);
11 }
12 });
13
14 return components;
15}

Callers 4

componentToSolidFunction · 0.90
generateOptionsApiScriptFunction · 0.90

Calls 2

isMitosisNodeFunction · 0.90
traverseFunction · 0.85

Tested by

no test coverage detected