babel-plugin-debug-tools
Advanced tools
Comparing version 1.0.23 to 1.0.24
@@ -168,23 +168,3 @@ "use strict"; | ||
function explainExpr(bigExpr, fields, addf) { | ||
if (t.isStringLiteral(bigExpr)) { | ||
return { | ||
caption: bigExpr.value, | ||
val: bigExpr | ||
}; | ||
} else if (t.isNumericLiteral(bigExpr)) { | ||
return { | ||
caption: bigExpr.value.toString(), | ||
val: bigExpr | ||
}; | ||
} else if (t.isBooleanLiteral(bigExpr)) { | ||
return { | ||
caption: bigExpr.value ? 'true' : 'false', | ||
val: bigExpr | ||
}; | ||
} else if (t.isNullLiteral(bigExpr)) { | ||
return { | ||
caption: 'null', | ||
val: bigExpr | ||
}; | ||
} else if (t.isIdentifier(bigExpr)) { | ||
if (t.isIdentifier(bigExpr)) { | ||
if (addf) fields[bigExpr.name] = t.clone(bigExpr); | ||
@@ -274,5 +254,8 @@ return { | ||
// return { caption: cname, expr: cclone } | ||
} | ||
} else if (t.isAssignmentExpression(bigExpr) || t.isUpdateExpression(bigExpr)) path.buildCodeFrameError("Don't change state when assert"); | ||
throw path.buildCodeFrameError("unsupported expression: " + bigExpr.type); | ||
return { | ||
caption: (0, _generator.default)(bigExpr).code, | ||
val: bigExpr | ||
}; | ||
} | ||
@@ -279,0 +262,0 @@ } |
{ | ||
"name": "babel-plugin-debug-tools", | ||
"version": "1.0.23", | ||
"version": "1.0.24", | ||
"description": "Helpers for debug Javascript Applications", | ||
@@ -5,0 +5,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
52761
259