Comparing version 0.5.1 to 0.5.2
@@ -84,3 +84,3 @@ const extend = require("extend"); | ||
function tokens(expr,method) { | ||
method = method || "ceval"; | ||
method = EVALS[method || "ceval"]; | ||
if(expr=="${JSON}") return function(entry) {return JSON.stringify(entry,null,2)}; | ||
@@ -93,6 +93,7 @@ | ||
var t = expr.substring(0,idx); | ||
var rtoken = token.replace(RX_RPL_TOKEN,""); | ||
expr = expr.substring(idx+token.length); | ||
list.push(t); | ||
list.push(function(entry){ | ||
return EVALS[method](entry,token.replace(RX_RPL_TOKEN,"")) | ||
return method(entry,rtoken); | ||
}); | ||
@@ -99,0 +100,0 @@ }); |
{ | ||
"name": "jsexpr", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"description": "String and JSON expression interpolator and evaluator. Interpolates or evaluates a string against a json object, or transforms an object into another based on a json template", | ||
@@ -5,0 +5,0 @@ "main": "dist/node/index.js", |
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
55740
737