Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

itty-router-extras

kwhitley14.4kMIT0.4.6TypeScript support: included

An assortment of delicious extras for the calorie-light itty-router.

router, cloudflare, workers, serverless, regex, routing, api, handler, params, middleware, nested, helpers, utils, cookies, content, cors

readme

Itty Router

npm package Build Status Coverage Status Open Issues

Deprecation Notice

itty-router-extras has been fully deprecated in favor of using the built-in helpers within itty-router itself.

Before

import { Router } from 'itty-router'
import { json, withParams, withContent, error } from 'itty-router-extras'

Now

import { Router, json, withParams, withContent, error } from 'itty-router'

v5.x Migration Guide

https://itty.dev/itty-router/migrations/v4-v5

changelog

Changelog

Until this library makes it to a production release of v1.x, minor versions may contain breaking changes to the API. After v1.x, semantic versioning will be honored, and breaking changes will only occur under the umbrella of a major version bump.

  • v0.3.0 - withParams may now be used as upstream middleware (e.g. router.all('*', withParams))