Comparing version 1.5.0 to 1.5.1
@@ -144,3 +144,3 @@ "use strict"; | ||
function compile(tree) { | ||
function compile(tree, options) { | ||
var context = { | ||
@@ -156,10 +156,14 @@ content: new utilities.CodeContext(), | ||
var compiled = new Function( | ||
"__util, data", | ||
var code = | ||
context.scope.code + | ||
"\n__output = '';\n" + | ||
context.content.code + | ||
"\nreturn __output;" | ||
); | ||
"\nreturn __output;"; | ||
if(options.debug) { | ||
console.log(code); | ||
} | ||
var compiled = new Function("__util, data", code); | ||
return function(data) { | ||
@@ -166,0 +170,0 @@ return compiled(utilities, data); |
{ | ||
"name": "razorleaf", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"main": "razorleaf.js", | ||
@@ -17,5 +17,2 @@ "files": [ | ||
}, | ||
"devDependencies": { | ||
"optimist": "~0.6.0" | ||
}, | ||
"repository": { | ||
@@ -22,0 +19,0 @@ "type": "git", |
@@ -79,6 +79,7 @@ "use strict"; | ||
options = options || {}; | ||
tree = loadExtends(tree, [], options); | ||
loadIncludes(tree, [], options); | ||
return compiler.compile(tree); | ||
return compiler.compile(tree, options); | ||
} | ||
@@ -85,0 +86,0 @@ |
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
30926
0
968