lark-router
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -13,2 +13,3 @@ /** | ||
import KoaRouter from 'koa-router'; | ||
import os from 'os'; | ||
import escapeRegexp from 'escape-string-regexp'; | ||
@@ -63,2 +64,4 @@ | ||
throw new Error('Invalid router prefix ' + prefix); | ||
} else if(os.platform().startsWith("win")) { | ||
prefix.replace(/\\/g,"/"); | ||
} | ||
@@ -65,0 +68,0 @@ debug('Router: create a new Router to load with prefix ' + prefix); |
{ | ||
"name": "lark-router", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "An koa route initialization and configuration module.", | ||
@@ -5,0 +5,0 @@ "main": ".easy", |
@@ -13,7 +13,7 @@ lark-router | ||
``` | ||
$ npm install lark-router | ||
$ npm install lark-router@~1.0.0 | ||
``` | ||
## API | ||
### `app.use(new Router().load('controllers').routes())` | ||
`app.use(new Router().load('controllers').routes())` | ||
@@ -28,3 +28,3 @@ Exmaple: | ||
const app = new Kao(); | ||
const app = new Koa(); | ||
@@ -31,0 +31,0 @@ app.use(router.routes()); |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
51728
988
0