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

Method reduce

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

* 类似数组的 reduce * @param fn

(fn: (acc: any, cur: IPublicModelNode) => any, initialValue: any)

Source from the content-addressed store, hash-verified

197 * @param fn
198 */
199 reduce(fn: (acc: any, cur: IPublicModelNode) => any, initialValue: any): void {
200 return this[nodeChildrenSymbol].reduce((acc: any, cur: InnerNode) => {
201 return fn(acc, ShellNode.create(cur)!);
202 }, initialValue);
203 }
204
205 /**
206 * 导入 schema

Callers

nothing calls this directly

Calls 2

reduceMethod · 0.65
createMethod · 0.45

Tested by

no test coverage detected