estraverse
Advanced tools
Comparing version 4.1.1 to 4.2.0
@@ -435,3 +435,9 @@ /* | ||
this.__state = null; | ||
this.__fallback = visitor.fallback === 'iteration'; | ||
this.__fallback = null; | ||
if (visitor.fallback === 'iteration') { | ||
this.__fallback = objectKeys; | ||
} else if (typeof visitor.fallback === 'function') { | ||
this.__fallback = visitor.fallback; | ||
} | ||
this.__keys = VisitorKeys; | ||
@@ -514,3 +520,3 @@ if (visitor.keys) { | ||
if (this.__fallback) { | ||
candidates = objectKeys(node); | ||
candidates = this.__fallback(node); | ||
} else { | ||
@@ -553,2 +559,16 @@ throw new Error('Unknown node type ' + nodeType + '.'); | ||
Controller.prototype.replace = function replace(root, visitor) { | ||
var worklist, | ||
leavelist, | ||
node, | ||
nodeType, | ||
target, | ||
element, | ||
current, | ||
current2, | ||
candidates, | ||
candidate, | ||
sentinel, | ||
outer, | ||
key; | ||
function removeElem(element) { | ||
@@ -579,16 +599,2 @@ var i, | ||
var worklist, | ||
leavelist, | ||
node, | ||
nodeType, | ||
target, | ||
element, | ||
current, | ||
current2, | ||
candidates, | ||
candidate, | ||
sentinel, | ||
outer, | ||
key; | ||
this.__initialize(root, visitor); | ||
@@ -671,3 +677,3 @@ | ||
if (this.__fallback) { | ||
candidates = objectKeys(node); | ||
candidates = this.__fallback(node); | ||
} else { | ||
@@ -674,0 +680,0 @@ throw new Error('Unknown node type ' + nodeType + '.'); |
@@ -6,3 +6,3 @@ { | ||
"main": "estraverse.js", | ||
"version": "4.1.1", | ||
"version": "4.2.0", | ||
"engines": { | ||
@@ -23,4 +23,5 @@ "node": ">=0.10.0" | ||
"devDependencies": { | ||
"babel-preset-es2015": "^6.3.13", | ||
"babel-register": "^6.3.13", | ||
"chai": "^2.1.1", | ||
"coffee-script": "^1.8.0", | ||
"espree": "^1.11.0", | ||
@@ -39,4 +40,4 @@ "gulp": "^3.8.10", | ||
"lint": "jshint estraverse.js", | ||
"unit-test": "mocha --compilers coffee:coffee-script/register" | ||
"unit-test": "mocha --compilers js:babel-register" | ||
} | ||
} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
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
794
32950
11
1
0
1