MCPcopy Index your code
hub / github.com/alibaba/lowcode-engine / includeSlot

Function includeSlot

packages/designer/src/utils/slot.ts:3–8  ·  view source on GitHub ↗
(node: Node, slotName: string | undefined)

Source from the content-addressed store, hash-verified

1import { Node } from '../document/node/node';
2
3export function includeSlot(node: Node, slotName: string | undefined): boolean {
4 const { slots = [] } = node;
5 return slots.some((slot) => {
6 return slotName && slotName === slot?.getExtraProp('name')?.getAsString();
7 });
8}
9
10export function removeSlot(node: Node, slotName: string | undefined): boolean {
11 const { slots = [] } = node;

Callers 2

addSlotMethod · 0.90
slot.test.tsFile · 0.90

Calls 3

someMethod · 0.65
getAsStringMethod · 0.65
getExtraPropMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…