Comparing version 1.1.3 to 1.2.0
32
index.js
/** | ||
* Module dependencies | ||
*/ | ||
var router = require('routington'); | ||
var assert = require('assert'); | ||
/** | ||
* Wayfarer prototype | ||
*/ | ||
var wayfarer = Wayfarer.prototype; | ||
/** | ||
* Expose 'router' | ||
*/ | ||
module.exports = Wayfarer; | ||
/** | ||
@@ -26,3 +26,3 @@ * Create a new router | ||
*/ | ||
function Wayfarer() { | ||
@@ -33,3 +33,3 @@ if (!(this instanceof Wayfarer)) return new Wayfarer(); | ||
} | ||
/** | ||
@@ -43,3 +43,3 @@ * Define a new path. | ||
*/ | ||
wayfarer.path = function(path, cb) { | ||
@@ -50,3 +50,3 @@ assert('string' == typeof path, 'Path should be a string'); | ||
node.cb = cb; | ||
return this; | ||
@@ -69,3 +69,3 @@ } | ||
} | ||
/** | ||
@@ -78,3 +78,3 @@ * Math a route against the paths. | ||
*/ | ||
wayfarer.match = function(path) { | ||
@@ -85,2 +85,8 @@ assert('string' == typeof path, 'Path should be a string'); | ||
return match.node.cb(); | ||
} | ||
} | ||
/** | ||
* Aliases. | ||
*/ | ||
wayfarer.route = wayfarer.path; |
{ | ||
"name": "wayfarer", | ||
"version": "1.1.3", | ||
"version": "1.2.0", | ||
"description": "A simple router built for minimalism and speed", | ||
@@ -5,0 +5,0 @@ "main": "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
6506
68