MCPcopy Create free account
hub / github.com/alibaba/lowcode-engine / isMixinComponent

Function isMixinComponent

packages/utils/src/build-components.ts:90–96  ·  view source on GitHub ↗

* 判断是否是一个混合组件,即 components 是一个对象,对象值是 React 组件 * 示例: * { * Button: ReactNode, * Text: ReactNode, * }

(components: any)

Source from the content-addressed store, hash-verified

88 * }
89 */
90function isMixinComponent(components: any) {
91 if (!isObject(components)) {
92 return false;
93 }
94
95 return Object.keys(components).some(componentName => isReactComponent(components[componentName]));
96}
97
98export function buildComponents(libraryMap: LibraryMap,
99 componentsMap: { [componentName: string]: IPublicTypeNpmInfo | ComponentType<any> | IPublicTypeComponentSchema },

Callers 1

buildComponentsFunction · 0.85

Calls 3

isObjectFunction · 0.90
isReactComponentFunction · 0.90
someMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…