packages/optimizer/lib/HtmlDomHelper.js
function findMetaViewport(head) {
  for (let node = head.firstChild; node !== null; node = node.nextSibling) {
    if (node.tagName === 'meta' && node.attribs.name === 'viewport') {
      return node;
    }
  }
  return null;
}
function findMetaViewport(head) {
  for (let node = head.firstChild; node !== null; node = node.nextSibling) {
    if (node.tagName === 'meta' && node.attribs.name === 'viewport') {
      return node;
    }
  }
  return null;
}
function findMetaViewport ( head ) { for ( let node = head . firstChild ; node !== null ; node = node . nextSibling ) { if ( node . tagName === 'meta' && node . attribs . name === 'viewport' ) { return node ; } } return null ; }
Finds and returns the first 'meta charset' element in the head.

@param {Node} head the section to search for the meta charset node.
@returns {Node} the '<meta charset>' node or null.
Finds and returns the first meta charset element in the head .