Home > vue-metamorph > astHelpers
astHelpers namespace
Functions
Function | Description |
|---|---|
Adds a default import to a script AST. If an import declaration for the module already exists, this function merges the default specifier into that declaration. It doesn't create duplicate imports. | |
createNamedImport(ast, moduleSpecifier, importName, localName) | Adds a named import to a script AST. If an import declaration for the module already exists, this function merges the new specifier into that declaration. It doesn't create duplicate imports. |
Adds a namespace import to a script AST. If an import declaration for the module already exists, this function merges the namespace specifier into that declaration. It doesn't create duplicate imports. | |
Finds every node in an AST that matches a partial node, using deep partial matching. This function works with both script ASTs from ESTree and template ASTs from vue-eslint-parser. | |
Finds the first node in an AST that matches a partial node, using deep partial matching. This function works with both script ASTs from ESTree and template ASTs from vue-eslint-parser. | |
Finds an existing import declaration for a module in a script AST. | |
Finds every Vue Options API object expression in a script AST. This function detects the objects that are passed to |
