estree-to-babel
Advanced tools
Comparing version 1.5.0 to 1.6.0
@@ -17,15 +17,4 @@ 'use strict'; | ||
module.exports = (node) => { | ||
const { | ||
comments = [], | ||
tokens, | ||
...program | ||
} = node; | ||
const ast = getAST(node); | ||
const ast = { | ||
type: 'File', | ||
program, | ||
comments, | ||
tokens, | ||
}; | ||
traverse(ast, { | ||
@@ -80,1 +69,21 @@ noScope: true, | ||
function getAST(node) { | ||
if (node.type === 'File') | ||
return node; | ||
const { | ||
comments = [], | ||
tokens, | ||
...program | ||
} = node; | ||
const ast = { | ||
type: 'File', | ||
program, | ||
comments, | ||
tokens, | ||
}; | ||
return ast; | ||
} | ||
{ | ||
"name": "estree-to-babel", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", | ||
@@ -35,2 +35,3 @@ "description": "convert estree ast to babel", | ||
"devDependencies": { | ||
"@babel/parser": "^7.3.1", | ||
"coveralls": "^3.0.0", | ||
@@ -37,0 +38,0 @@ "eslint": "^5.6.0", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8541
124
11