function isTag(tok, tag) {
  return !tok ||
    !(tok.type === 'startTag' || tok.type === 'atomicTag') ||
    !('tagName' in tok) ? !1 : !!~tok.tagName.toLowerCase().indexOf(tag);
}
Test if token is a script tag.

@param {Object} tok The token
@param {String} tag The tag name
@returns {boolean} True if the token is a script tag