title: Cheerio get element outer html
body: <p>I am using cheerio to parse html file on server side with node 6.10.2. I need to get outerHtml of each div inside document body and my code is:</p>
  
  <pre><code> /* const data is valid html document (type of string)*/
   const $ = cheerio.load(data);
   let pages = $('body &gt; div').toArray();
   console.log(pages[0]); // Elements parsed correctly
   let htmlPages = pages.map(page =&gt; $(page).html());
   console.log(htmlPages[0]); // Here I have innerHtml, not outer...      
  </code></pre>
  
  <p>Problem: I'm getting string with innerHtml.
  Can anybody help pls. ?</p>