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

Function accessLibrary

packages/utils/src/build-components.ts:14–20  ·  view source on GitHub ↗
(library: string | Record<string, unknown>)

Source from the content-addressed store, hash-verified

12}
13
14export function accessLibrary(library: string | Record<string, unknown>) {
15 if (typeof library !== 'string') {
16 return library;
17 }
18
19 return (window as any)[library] || generateHtmlComp(library);
20}
21
22export function generateHtmlComp(library: string) {
23 if (['a', 'img', 'div', 'span', 'svg'].includes(library)) {

Callers 3

findComponentFunction · 0.85
getProjectUtilsFunction · 0.85

Calls 1

generateHtmlCompFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…