src/parseDom.js
function getBodyObject ($) {
  const container = getContainer($)

  // Convert the root element into an array
  const children = []
  container
    .children()
    .map((i, el) => {
      children.push(convertToNode($(el)[0]))
    })

  return {
    children: children
      .filter(child => child !== null),
    name: 'div',
    attrs: {}
  }
}
function getBodyObject ($) {
  const container = getContainer($)

  // Convert the root element into an array
  const children = []
  container
    .children()
    .map((i, el) => {
      children.push(convertToNode($(el)[0]))
    })

  return {
    children: children
      .filter(child => child !== null),
    name: 'div',
    attrs: {}
  }
}
function getBodyObject ( $ ) { const container = getContainer ( $ ) // Convert the root element into an array const children = [ ] container . children ( ) . map ( ( i , el ) => { children . push ( convertToNode ( $ ( el ) [ 0 ] ) ) } ) return { children : children . filter ( child => child !== null ) , name : 'div' , attrs : { } } }
Get the Body of the DOM. Return it as plain JS object
Get the Body of the DOM . Return it as plain JS object