function getAttribute(node, name, value) {
  return (
    node.startTag.attributes.find(
      /**
       * @param {VAttribute | VDirective} node
       * @returns {node is VAttribute}
       */
      (node) =>
        !node.directive &&
        node.key.name === name &&
        (value === undefined ||
          (node.value != null && node.value.value === value))
    ) || null
  )
}
Get the attribute which has the given name.
@param {VElement} node The start tag node to check.
@param {string} name The attribute name to check.
@param {string} [value] The attribute value to check.
@returns {VAttribute | null} The found attribute.