packages/mip/src/util/dom/dom.js
function insert (parent, children) {
  if (!parent || !children) {
    return
  }
  let nodes = Array.prototype.slice.call(children)
  if (nodes.length === 0) {
    nodes.push(children)
  }
  for (let i = 0; i < nodes.length; i++) {
    if (this.contains(nodes[i], parent)) {
      continue
    }
    if (nodes[i] !== parent && parent.appendChild) {
      parent.appendChild(nodes[i])
    }
  }
}
function insert (parent, children) {
  if (!parent || !children) {
    return
  }
  let nodes = Array.prototype.slice.call(children)
  if (nodes.length === 0) {
    nodes.push(children)
  }
  for (let i = 0; i < nodes.length; i++) {
    if (this.contains(nodes[i], parent)) {
      continue
    }
    if (nodes[i] !== parent && parent.appendChild) {
      parent.appendChild(nodes[i])
    }
  }
}
function insert ( parent , children ) { if ( ! parent || ! children ) { return } let nodes = Array . prototype . slice . call ( children ) if ( nodes . length === 0 ) { nodes . push ( children ) } for ( let i = 0 ; i < nodes . length ; i ++ ) { if ( this . contains ( nodes [ i ] , parent ) ) { continue } if ( nodes [ i ] !== parent && parent . appendChild ) { parent . appendChild ( nodes [ i ] ) } } }
Insert dom list to a node

@param  {HTMLElement} parent the node will be inserted
@param {Array} children node list which will insert into parent
Insert dom list to a node