From f1b01d659fe573d1f4f881fc03364ef7534bd479 Mon Sep 17 00:00:00 2001 From: Alex Mingoia Date: Wed, 25 Nov 2015 10:32:57 -0800 Subject: [PATCH] Add note about path-to-regexp. --- README.md | 3 +++ lib/router.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index de0d197..4e4637d 100644 --- a/README.md +++ b/README.md @@ -174,6 +174,9 @@ router.get('/:category/:title', function (ctx, next) { }); ``` +The [path-to-regexp](https://github.com/pillarjs/path-to-regexp) module is used +to convert paths to regular expressions. + **Kind**: instance property of [Router](#exp_module_koa-router--Router) | Param | Type | Description | diff --git a/lib/router.js b/lib/router.js index 18de571..2b0b944 100644 --- a/lib/router.js +++ b/lib/router.js @@ -162,6 +162,9 @@ function Router(opts) { * }); * ``` * + * The [path-to-regexp](https://github.com/pillarjs/path-to-regexp) module is + * used to convert paths to regular expressions. + * * @name get|put|post|patch|delete * @memberof module:koa-router.prototype * @param {String} path