Socket
Socket
Sign inDemoInstall

itty-router

Package Overview
Dependencies
Maintainers
1
Versions
265
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

itty-router - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

12

package.json
{
"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",

22

README.md

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc