Comparing version 1.0.5 to 1.0.6
@@ -62,6 +62,2 @@ glob = require('glob'); | ||
function registerRoutes(middlewares) { | ||
var middlewareString = middlewares.reduce(function(prev, curr, index, array) { | ||
return prev + ', middlewares[' + index + ']'; | ||
}, ''); | ||
var sortedRouteKeys = _.sortBy(_.keys(routes), function(num){ return 1*num; }); | ||
@@ -74,4 +70,3 @@ _.each(sortedRouteKeys, function(key) { | ||
// TODO - there has to be a more elegant way to do this than eval, app.get.apply does not work for some reason | ||
eval('app[route.verb](route.path' + middlewareString + ')'); | ||
app[route.verb].apply(app, [route.path].concat(middlewares)); | ||
}); | ||
@@ -78,0 +73,0 @@ }); |
{ | ||
"name": "nodulejs", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Utility for discovering and initializing node/express 'nodules'", | ||
@@ -5,0 +5,0 @@ "main": "nodule.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
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
0
15176
65