ast-types
Advanced tools
Comparing version 0.5.6 to 0.5.7
@@ -131,13 +131,17 @@ var assert = require("assert"); | ||
} else { | ||
var name, names = types.getFieldNames(value); | ||
for (var i = 0, len = names.length; i < len; ++i) { | ||
if (!hasOwn.call(value, name = names[i])) { | ||
value[name] = types.getFieldValue(value, name); | ||
var childNames = types.getFieldNames(value); | ||
var childCount = childNames.length; | ||
var childPaths = []; | ||
for (var i = 0; i < childCount; ++i) { | ||
var childName = childNames[i]; | ||
if (!hasOwn.call(value, childName)) { | ||
value[childName] = types.getFieldValue(value, childName); | ||
} | ||
visitor.visit(path.get(name)); | ||
assert.strictEqual( | ||
value, path.value, | ||
"Path value changed while traversing its children" | ||
); | ||
childPaths.push(path.get(childName)); | ||
} | ||
for (var i = 0; i < childCount; ++i) { | ||
visitor.visit(childPaths[i]); | ||
} | ||
} | ||
@@ -144,0 +148,0 @@ } |
@@ -21,3 +21,3 @@ { | ||
], | ||
"version": "0.5.6", | ||
"version": "0.5.7", | ||
"homepage": "http://github.com/benjamn/ast-types", | ||
@@ -24,0 +24,0 @@ "repository": { |
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
108519
2538