itty-router
Advanced tools
Comparing version 0.4.0 to 0.4.1
{ | ||
"name": "itty-router", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "", | ||
"main": "src/Router.js", | ||
"keywords": [ | ||
"router", | ||
"serverless", | ||
"express", | ||
"regexp", | ||
"routing", | ||
"api", | ||
"handler", | ||
"params" | ||
], | ||
"scripts": { | ||
@@ -7,0 +17,0 @@ "test": "jest --watch", |
@@ -7,2 +7,4 @@ # itty-router | ||
Did we mention it supports route/query params like in Express.js? | ||
## Installation | ||
@@ -19,14 +21,15 @@ | ||
## Our Goals | ||
- [x] have a simple express-like (or better) interface | ||
- [x] have a chainable interface! | ||
## Project Goals | ||
- [x] be tiny | ||
- [x] be easy to use/implement | ||
- [x] have as few dependencies as possible (ZERO) | ||
- [x] have test coverage | ||
- [x] have a README | ||
- [x] have a way to release | ||
- [ ] have pretty code (right...) | ||
- [x] be easy to use/implement (simple express-like or better interface) | ||
- [x] support route params (e.g. `/api/:collection/:id`) | ||
- [x] support optional route params (e.g. `/todos/:id?`) | ||
- [x] support automatic query param parsing | ||
- [x] chainable route declarations | ||
- [x] pass parsed route params to route handler (e.g. `{ params: { foo: 'bar' }}`) | ||
- [x] pass parsed query params to route handler (e.g. `{ query: { page: '3' }}` from `/foo?page=3`) | ||
- [ ] handle all the basics of routing within a serverless function | ||
- [ ] be platform agnostic (or handle the responses of the major platforms) | ||
- [x] zero dependencies | ||
- [ ] have pretty code (yeah right...) | ||
@@ -47,2 +50,3 @@ ## Example | ||
.get('/chainable', () => console.log('because why not?')) // this may be dropped to save characters... | ||
.get('/optional/:support?', () => console.log('optionals!')) // will match /optional and /optional/14 both | ||
@@ -49,0 +53,0 @@ // works with POST, DELETE, PATCH, etc |
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
8592
107