MCPcopy
hub / github.com/alibaba/lowcode-engine / isJSSlot

Function isJSSlot

packages/renderer-core/src/utils/common.ts:95–105  ·  view source on GitHub ↗
(obj: any)

Source from the content-addressed store, hash-verified

93 * @returns string
94 */
95export function isJSSlot(obj: any): obj is IPublicTypeJSSlot {
96 if (!obj) {
97 return false;
98 }
99 if (typeof obj !== 'object' || Array.isArray(obj)) {
100 return false;
101 }
102
103 // Compatible with the old protocol JSBlock
104 return [EXPRESSION_TYPE.JSSLOT, EXPRESSION_TYPE.JSBLOCK].includes(obj.type);
105}
106
107/**
108 * get value from an object

Callers 2

BaseRendererClass · 0.90
common.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…