function getDirectives(node, name) {
  const attributes =
    node.type === 'VElement' ? node.startTag.attributes : node.attributes
  return attributes.filter(
    /**
     * @param {VAttribute | VDirective} node
     * @returns {node is VDirective}
     */
    (node) => node.directive && node.key.name.name === name
  )
}
Get the directive list which has the given name.
@param {VElement | VStartTag} node The start tag node to check.
@param {string} name The directive name to check.
@returns {VDirective[]} The array of `v-slot` directives.