Comparing version 0.4.1 to 0.4.2
@@ -10,3 +10,3 @@ "use strict"; | ||
var alter = require("alter"); | ||
var traverse = require("./traverse"); | ||
var traverse = require("ast-traverse"); | ||
var Scope = require("./scope"); | ||
@@ -488,3 +488,9 @@ var error = require("./error"); | ||
// get rid of all added $ properties first, such as $parent and $scope | ||
traverse(ast, {cleanup: true}); | ||
traverse(ast, {pre: function(node) { | ||
for (var prop in node) { | ||
if (prop[0] === "$") { | ||
delete node[prop]; | ||
} | ||
} | ||
}}); | ||
return { | ||
@@ -491,0 +497,0 @@ stats: stats, |
@@ -10,3 +10,3 @@ "use strict"; | ||
const alter = require("alter"); | ||
const traverse = require("./traverse"); | ||
const traverse = require("ast-traverse"); | ||
const Scope = require("./scope"); | ||
@@ -488,3 +488,9 @@ const error = require("./error"); | ||
// get rid of all added $ properties first, such as $parent and $scope | ||
traverse(ast, {cleanup: true}); | ||
traverse(ast, {pre: function(node) { | ||
for (let prop in node) { | ||
if (prop[0] === "$") { | ||
delete node[prop]; | ||
} | ||
} | ||
}}); | ||
return { | ||
@@ -491,0 +497,0 @@ stats: stats, |
{ | ||
"name": "defs", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "Static scope analysis and transpilation of ES6 block scoped const and let variables, to ES3.", | ||
@@ -12,2 +12,3 @@ "main": "build/es5/defs-main.js", | ||
"alter": "~0.1.0", | ||
"ast-traverse": "~0.1.0", | ||
"simple-fmt": "~0.1.0", | ||
@@ -14,0 +15,0 @@ "simple-is": "~0.2.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
97503
8
77
2632
+ Addedast-traverse@~0.1.0
+ Addedast-traverse@0.1.1(transitive)