Routers v5
The itty ecosystem has grown to include three (3) routers, spanning everything from the absolute minimalist IttyRouter
to the latest batteries-included AutoRouter
.
Comparison
Feature or Option | IttyRouter | Router | AutoRouter |
---|---|---|---|
Latest Size | |||
Relative Speed | 🚀🚀🚀 | 🚀🚀 | 🚀🚀 |
base & nesting | ✅ | ✅ | ✅ |
object passthrough | ✅ | ✅ | ✅ |
before stage (executes before route-matching) | ❌ | ✅ | ✅ |
catch stage (catch any thrown errors) | ❌ | ✅ | ✅ |
finally stage (executes after everything) | ❌ | ✅ | ✅ |
missing (includes 404 handler) | ❌ | ❌ | ✅ |
format (response formatter, defaults to json ) | ❌ | ❌ | ✅ |
includes withParams | ❌ | ❌ | ✅ |