shift-reducer
Advanced tools
Comparing version 2.0.4 to 2.0.6
@@ -32,3 +32,2 @@ /** | ||
spec = _x3; | ||
_ret = undefined; | ||
_again = false; | ||
@@ -75,16 +74,11 @@ | ||
default: | ||
{ | ||
var _ret = (function () { | ||
var state = {}; | ||
spec.fields.forEach(function (field) { | ||
var v = transformWithSpec(transformer, node[field.name], field.type); | ||
state[field.name] = v == null ? null : v; | ||
}); | ||
return { | ||
v: transformer["reduce" + node.type](node, state) | ||
}; | ||
})(); | ||
if (typeof _ret === "object") return _ret.v; | ||
var state = {}; | ||
spec.fields.forEach(function (field) { | ||
var v = transformWithSpec(transformer, node[field.name], field.type); | ||
state[field.name] = v == null ? null : v; | ||
}); | ||
if (typeof transformer["reduce" + node.type] !== "function") { | ||
throw new Error("Encountered " + node.type + ", which the provided reducer does not handle."); | ||
} | ||
return transformer["reduce" + node.type](node, state); | ||
} | ||
@@ -91,0 +85,0 @@ } |
@@ -36,3 +36,2 @@ /** | ||
var type = _x; | ||
_ret = _ret2 = undefined; | ||
_again = false; | ||
@@ -39,0 +38,0 @@ |
{ | ||
"name": "shift-reducer", | ||
"version": "2.0.4", | ||
"version": "2.0.6", | ||
"description": "reducer for the Shift AST format", | ||
@@ -17,3 +17,4 @@ "author": "Shape Security Labs", | ||
"test": "mocha --compilers js:./babel-register --inline-diffs --check-leaks --ui tdd --reporter dot test", | ||
"build": "babel --modules commonStrict --source-maps-inline --out-dir dist src" | ||
"build": "babel --modules commonStrict --source-maps-inline --out-dir dist src", | ||
"prepublish": "rm -rf dist && npm update && npm run build" | ||
}, | ||
@@ -20,0 +21,0 @@ "dependencies": { |
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
22432
237