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

Method find

packages/shell/src/model/node-children.ts:187–193  ·  view source on GitHub ↗

* 类似数组的 find * @param fn

(fn: (node: IPublicModelNode, index: number) => boolean)

Source from the content-addressed store, hash-verified

185 * @param fn
186 */
187 find(fn: (node: IPublicModelNode, index: number) => boolean): IPublicModelNode | null {
188 return ShellNode.create(
189 this[nodeChildrenSymbol].find((item: InnerNode, index: number) => {
190 return fn(ShellNode.create(item)!, index);
191 }),
192 );
193 }
194
195 /**
196 * 类似数组的 reduce

Callers

nothing calls this directly

Calls 2

findMethod · 0.65
createMethod · 0.45

Tested by

no test coverage detected