src/generators/javascript/index.js
function extendTagProperty(ast, exportDefaultNode) {
  types.visit(ast, {
    visitProperty(path) {
      if (path.value.key.value === TAG_LOGIC_PROPERTY) {
        path.value.value = exportDefaultNode.declaration
        return false
      }

      this.traverse(path)
    }
  })

  return ast
}
function extendTagProperty(ast, exportDefaultNode) {
  types.visit(ast, {
    visitProperty(path) {
      if (path.value.key.value === TAG_LOGIC_PROPERTY) {
        path.value.value = exportDefaultNode.declaration
        return false
      }

      this.traverse(path)
    }
  })

  return ast
}
function extendTagProperty ( ast , exportDefaultNode ) { types . visit ( ast , { visitProperty ( path ) { if ( path . value . key . value === TAG_LOGIC_PROPERTY ) { path . value . value = exportDefaultNode . declaration return false } this . traverse ( path ) } } ) return ast }
Extend the AST adding the new tag method containing our tag sourcecode
@param   { Object } ast - current output ast
@param   { Object } exportDefaultNode - tag export default node
@returns { Object } the output ast having the "tag" key extended with the content of the export default
Extend the AST adding the new tag method containing our tag sourcecode