5.0.17 • Published 7 days ago

itty-router v5.0.17

Weekly downloads
1,113
License
MIT
Repository
github
Last release
7 days ago

Version Bundle Size Build Status Coverage Downloads Issues Discord Github Follow @ittydev

v5 Documentation  |   v4 -> v5 Migration Guide  |   Discord


An ultra-tiny API microrouter, for use when size matters (e.g. Cloudflare Workers).

Features

  • Tiny. Routers from ~450 bytes to a ~970 bytes batteries-included version (~240-500x smaller than Express.js).
  • TypeScript. Powerfully (and flexibly) typed for any environment.
  • Route-parsing & query parsing.
  • Middleware. Use ours or write your own.
  • 100% Test Coverage. Bulletproof for production peace-of-mind.
  • Designed specifically for serverless (but works anywhere).
  • No assumptions. Return anything; pass in anything.
  • Future-proof. HTTP methods not-yet-invented already work with it.

Example

import { AutoRouter } from 'itty-router' // ~1kB

const router = AutoRouter()

router
  .get('/hello/:name', ({ name }) => `Hello, ${name}!`)
  .get('/json', () => [1,2,3])
  .get('/promises', () => Promise.resolve('foo'))

export default router

// that's it ^-^

Need Help?

Complete API documentation is available on itty.dev, or join our Discord channel to chat with community members for quick help!

Join the Discussion!

Have a question? Suggestion? Idea? Complaint? Want to send a gift basket? Join us on Discord!

A Special Thanks :heart:

As the community and contributor list has grown (and thus an individualized list here is no longer easily maintainable), I'd like to thank each and every one of you for making itty far greater than its humble origins. The robustness you see today, the careful consideration of every byte spent on features, the API choices, the code-golfing itself... are all thanks to the efforts and feedback from the community. I'd especially like to thank the core contributors and PR-authors, as well as the fantastic folks on the itty Discord group, for their tireless work refining this little beast and answering community questions.

5.0.17

7 days ago

5.0.16

16 days ago

5.0.13

21 days ago

5.0.14

21 days ago

5.0.15

21 days ago

5.0.10

27 days ago

5.0.11

27 days ago

5.0.12

26 days ago

5.0.12-next.0

26 days ago

5.0.9

1 month ago

5.0.8

1 month ago

5.0.7

1 month ago

5.0.6

1 month ago

5.0.5

1 month ago

5.0.4

1 month ago

5.0.3

1 month ago

5.0.2

1 month ago

5.0.1

1 month ago

5.0.0

1 month ago

6.0.0

1 month ago

5.0.0-next.1

1 month ago

5.0.0-next.2

1 month ago

5.0.0-next.3

1 month ago

4.3.0-next.4

1 month ago

4.3.0-next.3

1 month ago

4.3.0-next.2

1 month ago

4.3.0-next.1

2 months ago

4.3.0-next.0

2 months ago

4.2.2

2 months ago

4.2.1

2 months ago

4.1.1-next.0

2 months ago

4.0.28

2 months ago

4.2.0

2 months ago

4.1.0

2 months ago

4.1.1

2 months ago

4.0.27

4 months ago

4.0.26

4 months ago

4.0.25

5 months ago

4.0.24-next.0

5 months ago

4.0.25-next.0

5 months ago

4.0.25-next.1

5 months ago

4.0.24

5 months ago

4.0.23

8 months ago

4.1.0-next.2

8 months ago

4.1.0-next.3

8 months ago

4.1.0-next.4

8 months ago

4.0.21

9 months ago

4.0.22

9 months ago

4.0.0-next.52

12 months ago

4.0.0-next.50

12 months ago

4.0.0-next.53

12 months ago

4.0.0-next.48

12 months ago

4.0.0-next.49

12 months ago

4.0.5

11 months ago

4.0.4

11 months ago

4.0.7

11 months ago

4.0.6

11 months ago

4.0.1

12 months ago

4.0.0

12 months ago

4.0.3

11 months ago

4.0.2

12 months ago

4.0.9

11 months ago

4.0.8

11 months ago

4.0.10-next.1

11 months ago

4.0.10-next.2

11 months ago

4.0.10-next.3

11 months ago

4.0.10-next.4

11 months ago

4.0.10-next.0

11 months ago

4.0.19

9 months ago

4.0.20

9 months ago

4.0.10

11 months ago

4.0.16

9 months ago

4.0.15

9 months ago

4.0.18

9 months ago

4.0.17

9 months ago

4.0.12

11 months ago

4.0.11

11 months ago

4.0.14

10 months ago

4.0.13

11 months ago

4.1.0-next.1

9 months ago

4.1.0-next.0

9 months ago

4.0.11-next.7

11 months ago

4.0.11-next.6

11 months ago

4.0.11-next.1

11 months ago

4.0.11-next.0

11 months ago

4.0.11-next.5

11 months ago

4.0.11-next.4

11 months ago

4.0.11-next.3

11 months ago

4.0.11-next.2

11 months ago

4.0.9-next.0

11 months ago

4.0.0-next.47

1 year ago

3.0.11-next.45

1 year ago

3.0.11-next.40

1 year ago

3.0.11-next.43

1 year ago

3.0.11-next.41

1 year ago

3.0.11-next.42

1 year ago

3.0.12

1 year ago

4.0.0-next.46

1 year ago

3.0.11-next.9

1 year ago

3.0.11-next.7

1 year ago

3.0.11-next.8

1 year ago

3.0.11-next.5

1 year ago

3.0.11-next.6

1 year ago

3.0.11-next.3

1 year ago

3.0.11-next.4

1 year ago

3.0.11-next.1

1 year ago

3.0.11-next.2

1 year ago

3.0.11-next.0

1 year ago

3.0.11-next.14

1 year ago

3.0.11-next.15

1 year ago

3.0.11-next.12

1 year ago

3.0.11-next.13

1 year ago

3.0.11-next.18

1 year ago

3.0.11-next.19

1 year ago

3.0.11-next.16

1 year ago

3.0.11-next.17

1 year ago

3.0.11-next.10

1 year ago

3.0.11-next.11

1 year ago

3.0.11-next.25

1 year ago

3.0.11-next.26

1 year ago

3.0.11-next.23

1 year ago

3.0.11-next.24

1 year ago

3.0.11-next.29

1 year ago

3.0.11-next.27

1 year ago

3.0.11-next.28

1 year ago

3.0.11-next.21

1 year ago

3.0.11-next.22

1 year ago

3.0.11-next.20

1 year ago

3.0.11-next.36

1 year ago

3.0.11-next.37

1 year ago

3.0.11-next.34

1 year ago

3.0.11-next.35

1 year ago

3.0.11-next.38

1 year ago

3.0.11-next.39

1 year ago

3.0.11-next.32

1 year ago

3.0.11-next.33

1 year ago

3.0.11-next.30

1 year ago

3.0.11-next.31

1 year ago

3.0.10

1 year ago

3.0.11

1 year ago

3.0.10-next.0

1 year ago

3.0.0-next.2

2 years ago

3.0.0-next.1

2 years ago

3.0.0-next.4

2 years ago

3.0.0-next.3

2 years ago

3.0.0-next.0

2 years ago

3.0.0-next.6

2 years ago

3.0.0-next.5

2 years ago

3.0.4

1 year ago

3.0.3

1 year ago

3.0.2

1 year ago

3.0.1

1 year ago

3.0.8

1 year ago

3.0.7

1 year ago

3.0.6

1 year ago

3.0.5

1 year ago

3.0.9

1 year ago

2.6.3

2 years ago

2.6.2

2 years ago

2.6.5

2 years ago

2.6.4

2 years ago

2.6.6

2 years ago

2.6.1

2 years ago

2.6.0

2 years ago

2.5.3

2 years ago

2.5.0

2 years ago

2.5.2

2 years ago

2.5.1

2 years ago

2.4.10

2 years ago

2.4.7

2 years ago

2.4.6

2 years ago

2.4.9

2 years ago

2.4.8

2 years ago

2.4.5

2 years ago

2.4.3

3 years ago

2.4.4

3 years ago

2.4.1

3 years ago

2.4.2

3 years ago

2.4.0

3 years ago

2.3.10-next.0

3 years ago

2.3.10-next.1

3 years ago

2.3.10-next.2

3 years ago

2.3.8

3 years ago

2.3.7

3 years ago

2.3.9

3 years ago

2.3.10

3 years ago

2.3.6

3 years ago

2.3.4

3 years ago

2.3.3

3 years ago

2.3.5

3 years ago

2.3.2

3 years ago

2.3.0

3 years ago

2.3.1

3 years ago

2.2.1

3 years ago

2.2.0

3 years ago

2.1.9

3 years ago

2.1.8

3 years ago

2.1.7

3 years ago

2.1.6

3 years ago

2.1.5

3 years ago

2.1.4

3 years ago

2.1.3

3 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.0.7

3 years ago

2.1.0

3 years ago

2.0.3

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.6

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.6.0

3 years ago

1.5.0

3 years ago

1.4.3

3 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.0

4 years ago

1.2.15

4 years ago

1.2.14

4 years ago

1.2.10

4 years ago

1.2.8

4 years ago

1.2.7

4 years ago

1.2.5

4 years ago

1.2.9

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.0

4 years ago

1.1.1

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.1.2

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago

0.9.7

4 years ago

0.9.6

4 years ago

0.9.4

4 years ago

0.9.3

4 years ago

0.9.5

4 years ago

0.9.2

4 years ago

0.9.1

4 years ago

0.8.1

4 years ago

0.8.0

4 years ago

0.8.2

4 years ago

0.7.3

4 years ago

0.7.2

4 years ago

0.7.1

4 years ago

0.7.0

4 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.5.4

4 years ago

0.5.3

4 years ago

0.5.2

4 years ago

0.5.1

4 years ago

0.5.0

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.4.2

4 years ago

0.3.0

4 years ago

0.1.1

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago