code: function hasDirective (path) {
    let matched = false
  
    if (!path || typeof path.findParent !== 'function') return matched
  
    path.findParent((parent) => {
      parent.node.directives && parent.node.directives.some(({ value }) => {
        matched = value.value === DIRECTIVE
  
        if (!matched) {
          return hasDirective(parent)
        }
      })
    })
  
    return matched
  }
docs: /* check to see if scope has directive "use pipe"