routington
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -14,6 +14,4 @@ var Routington = require('./routington') | ||
var frags = route.split('/') | ||
try { | ||
return Define(frags, this) | ||
return Define(route.split('/'), this) | ||
} catch (err) { | ||
@@ -20,0 +18,0 @@ err.route = route |
{ | ||
"name": "routington", | ||
"description": "Trie-based URL Routing", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"devDependencies": { | ||
@@ -6,0 +6,0 @@ "mocha": "*", |
@@ -58,5 +58,2 @@ ## Routington [![Build Status](https://travis-ci.org/jonathanong/routington.png)](https://travis-ci.org/jonathanong/routington) | ||
Each `node` of `nodes` will always have `node.string === ''`. | ||
URLs are always treated with a trailing `/` by design. __Note: this will be changed in the future__. | ||
You should always name your regular expressions otherwise you can't use the captured value. | ||
@@ -106,3 +103,3 @@ The regular expression is built using `new RegExp('^(' + regex + ')$', 'i')`, | ||
router.get = function (path, handler) { | ||
var node = router.define(path) | ||
var node = router.define(path)[0] | ||
node.GET = node.GET || [] | ||
@@ -138,3 +135,3 @@ node.GET.push(handler) | ||
```js | ||
var node = router.define('/:id/:controller') | ||
var node = router.define('/:id/:controller')[0] | ||
node.label = 'controller' | ||
@@ -141,0 +138,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
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
12927
248
183