code: function forIn(obj, handler) {
    var childrenKey = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'children';
  
    var rootChildren, rootParent, _func;
    if (isArray(obj)) {
      rootChildren = obj;
      rootParent = null;
    } else {
      rootChildren = [obj];
      rootParent = null;
    }
    if (rootChildren) {
      _func = function func(children, parent) {
        for (var key in children) {
          var child = children[key];
          if (handler(child, key, parent) === false) {
            return false;
          }
          if (child[childrenKey] != null) {
            if (_func(child[childrenKey], child) === false) {
              return false;
            }
          }
        }
        return true;
      };
      _func(rootChildren, rootParent);
    }
    return obj;
  }
docs: 旧版深度优先遍历 old Depth-First-Search