UNPKG

@antv/f2

Version:

Charts for mobile visualization.

22 lines (21 loc) 451 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; function _default(callback, that) { var node = this, nodes = [node], children, i, index = -1; while (node = nodes.pop()) { callback.call(that, node, ++index, this); if (children = node.children) { for (i = children.length - 1; i >= 0; --i) { nodes.push(children[i]); } } } return this; }