mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-04-20 04:18:05 +00:00
7 lines
234 B
TypeScript
7 lines
234 B
TypeScript
import { NodeChildren } from '../document/node/node-children';
|
|
|
|
export function foreachReverse(arr: NodeChildren, fn: Function, context: any = {}) {
|
|
for (let i = arr.length - 1; i >= 0; i--) {
|
|
fn.call(context, arr.get(i));
|
|
}
|
|
} |