lib/helper/combine.js
function(item){
    var children,node, nodes;
    if(!item) return;
    if(typeof item.node === "function") return item.node();
    if(typeof item.nodeType === "number") return item;
    if(item.group) return combine.node(item.group)

    item = item.children || item;
    if( Array.isArray(item )){
      var len = item.length;
      if(len === 1){
        return combine.node(item[0]);
      }
      nodes = [];
      for(var i = 0, len = item.length; i < len; i++ ){
        node = combine.node(item[i]);
        if(Array.isArray(node)){
          for (var j = 0, len1 = node.length; j < len1; j++){
            nodes.push(node[j])
          }
        }else if(node) {
          nodes.push(node)
        }
      }
      return nodes;
    }
    
  }
function(item){
    var children,node, nodes;
    if(!item) return;
    if(typeof item.node === "function") return item.node();
    if(typeof item.nodeType === "number") return item;
    if(item.group) return combine.node(item.group)

    item = item.children || item;
    if( Array.isArray(item )){
      var len = item.length;
      if(len === 1){
        return combine.node(item[0]);
      }
      nodes = [];
      for(var i = 0, len = item.length; i < len; i++ ){
        node = combine.node(item[i]);
        if(Array.isArray(node)){
          for (var j = 0, len1 = node.length; j < len1; j++){
            nodes.push(node[j])
          }
        }else if(node) {
          nodes.push(node)
        }
      }
      return nodes;
    }
    
  }
function ( item ) { var children , node , nodes ; if ( ! item ) return ; if ( typeof item . node === "function" ) return item . node ( ) ; if ( typeof item . nodeType === "number" ) return item ; if ( item . group ) return combine . node ( item . group ) item = item . children || item ; if ( Array . isArray ( item ) ) { var len = item . length ; if ( len === 1 ) { return combine . node ( item [ 0 ] ) ; } nodes = [ ] ; for ( var i = 0 , len = item . length ; i < len ; i ++ ) { node = combine . node ( item [ i ] ) ; if ( Array . isArray ( node ) ) { for ( var j = 0 , len1 = node . length ; j < len1 ; j ++ ) { nodes . push ( node [ j ] ) } } else if ( node ) { nodes . push ( node ) } } return nodes ; } }
get the initial dom in object
get the initial dom in object