expressjs-router
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -16,3 +16,3 @@ "use strict"; | ||
function createConditional(name, func) | ||
function createConditional(name, func) | ||
{ | ||
@@ -78,7 +78,7 @@ if (!name || typeof name !== "string") { | ||
if (!shouldRunRoute) return; | ||
if (!conditionals[conditionalName]) { | ||
throw new Error("Unexisting conditional '" + conditionalName + "'"); | ||
} | ||
shouldRunRoute = conditionals[conditionalName](req, res); | ||
@@ -128,3 +128,3 @@ }); | ||
); | ||
if (DEBUG) { | ||
@@ -152,3 +152,3 @@ console.log("Created route => %s %s", definition.method, definition.path); | ||
var definitions = []; | ||
files.forEach(function (file) { | ||
@@ -159,3 +159,3 @@ | ||
if (file.length > 0 && file[0] === '_') | ||
if (file.length > 0 && file[0] === '_' && file[0] === '.') | ||
return; | ||
@@ -165,7 +165,7 @@ | ||
try { | ||
try { | ||
var definition = require(realPath); | ||
_validateRoute(definition); | ||
definitions.push(definition); | ||
@@ -183,3 +183,3 @@ } | ||
}); | ||
definitions.forEach(function (definition) { | ||
@@ -186,0 +186,0 @@ _buildRoute(app, definition); |
{ | ||
"name": "expressjs-router", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "Structured routes for ExpressJS", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
9833