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, the default specifier is merged into it. Duplicate imports are skipped. | |
createNamedImport(ast, moduleSpecifier, importName, localName) | Adds a named import to a script AST. If an import declaration for the module already exists, the new specifier is merged into it. Duplicate imports are skipped. |
Adds a namespace (star) import to a script AST. If an import declaration for the module already exists, the namespace specifier is merged into it. Duplicate imports are skipped. | |
Finds all nodes in an AST that match a partial node using deep partial matching. Works with both script ASTs (ESTree) and template ASTs (vue-eslint-parser). | |
Finds the first node in an AST that matches a partial node using deep partial matching. Works with both script ASTs (ESTree) and template ASTs (vue-eslint-parser). | |
Finds an existing import declaration for a module in a script AST. | |
Finds all Vue Options API object expressions in a script AST. Detects objects passed to |
