trek-router
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -7,3 +7,3 @@ 'use strict'; | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (descriptor.value) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
@@ -10,0 +10,0 @@ Object.defineProperty(exports, '__esModule', { |
{ | ||
"name": "trek-router", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "A fast HTTP router router", | ||
@@ -24,3 +24,3 @@ "repository": "trekjs/router", | ||
"devDependencies": { | ||
"babel": "^5.0.7", | ||
"babel": "^5.0.8", | ||
"benchmark": "^1.0.0", | ||
@@ -27,0 +27,0 @@ "isparta": "^3.0.0", |
@@ -17,3 +17,3 @@ # trek-router | ||
```bash | ||
$ node benchmarks | ||
$ npm run benchmark | ||
``` | ||
@@ -35,6 +35,8 @@ | ||
let result = r.find('GET', '/users/233') | ||
// => [handler, params] | ||
// => [()=>{}, [{name: id, value: 233}]] | ||
let result = r.find('GET', '/photos/233') | ||
// => null | ||
// => [handler, params] | ||
// => [null, []] | ||
``` | ||
@@ -41,0 +43,0 @@ |
10251
58