Skip to content

Commit

Permalink
chore(docs): update readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
Lordfirespeed committed Aug 14, 2024
1 parent e8964c8 commit 894dced
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 16 deletions.
3 changes: 2 additions & 1 deletion packages/etag/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# @otterhttp/etag

[![npm (scoped)](https://img.shields.io/npm/v/@otterhttp/etag?style=flat-square)](https://npmjs.com/package/@otterhttp/etag) [![npm](https://img.shields.io/npm/dt/@otterhttp/etag?style=flat-square)](https://npmjs.com/package/@otterhttp/etag) [![](https://img.shields.io/badge/website-visit-hotpink?style=flat-square)](https://tinyhttp.v1rtl.site/mw/etag)
[![npm (scoped)](https://img.shields.io/npm/v/@otterhttp/etag?style=flat-square)](https://npmjs.com/package/@otterhttp/etag)
[![npm](https://img.shields.io/npm/dt/@otterhttp/etag?style=flat-square)](https://npmjs.com/package/@otterhttp/etag)

> A rewrite of [etag](https://www.npmjs.com/package/etag) module.
Expand Down
3 changes: 2 additions & 1 deletion packages/jsonp/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# @otterhttp/jsonp

[![npm (scoped)](https://img.shields.io/npm/v/@otterhttp/jsonp?style=flat-square)](https://npmjs.com/package/@otterhttp/jsonp) [![npm](https://img.shields.io/npm/dt/@otterhttp/jsonp?style=flat-square)](https://npmjs.com/package/@otterhttp/jsonp) [![](https://img.shields.io/badge/website-visit-hotpink?style=flat-square)](https://tinyhttp.v1rtl.site/mw/jsonp)
[![npm (scoped)](https://img.shields.io/npm/v/@otterhttp/jsonp?style=flat-square)](https://npmjs.com/package/@otterhttp/jsonp)
[![npm](https://img.shields.io/npm/dt/@otterhttp/jsonp?style=flat-square)](https://npmjs.com/package/@otterhttp/jsonp)

JSONP response extension.

Expand Down
4 changes: 2 additions & 2 deletions packages/rate-limit/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# @otterhttp/rate-limit

[![npm (scoped)][npm-badge]](https://npmjs.com/package/@otterhttp/rate-limit) [![npm][dl-badge]](https://npmjs.com/package/@otterhttp/rate-limit) [![][web-badge]](https://tinyhttp.v1rtl.site/mw/rate-limit)
[![npm (scoped)][npm-badge]](https://npmjs.com/package/@otterhttp/rate-limit)
[![npm][dl-badge]](https://npmjs.com/package/@otterhttp/rate-limit)

Basic rate-limiting middleware for tinyhttp. Used to limit repeated requests to public APIs and/or endpoints such as password reset.

Expand Down Expand Up @@ -44,4 +45,3 @@ new App().get('limited-route', rateLimit({ max: 10, windowMs: 60 * 1000 /* 1 min

[npm-badge]: https://img.shields.io/npm/v/@otterhttp/rate-limit?style=flat-square
[dl-badge]: https://img.shields.io/npm/dt/@otterhttp/rate-limit?style=flat-square
[web-badge]: https://img.shields.io/badge/website-visit-hotpink?style=flat-square
1 change: 0 additions & 1 deletion packages/request/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ pnpm i @otterhttp/request

[npm-badge]: https://img.shields.io/npm/v/@otterhttp/request?style=flat-square
[dl-badge]: https://img.shields.io/npm/dt/@otterhttp/request?style=flat-square
[web-badge]: https://img.shields.io/badge/website-visit-hotpink?style=flat-square
5 changes: 0 additions & 5 deletions packages/response/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,5 @@ Response extensions for tinyhttp collected in one package. This module itself de
pnpm i @otterhttp/response
```

## API

[tinyhttp Response docs](https://tinyhttp.v1rtl.site/docs#response).

[npm-badge]: https://img.shields.io/npm/v/@otterhttp/response?style=flat-square
[dl-badge]: https://img.shields.io/npm/dt/@otterhttp/response?style=flat-square
[web-badge]: https://img.shields.io/badge/website-visit-hotpink?style=flat-square
10 changes: 4 additions & 6 deletions packages/send/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

[![npm (scoped)][npm-badge]](https://npmjs.com/package/@otterhttp/send)
[![npm][dl-badge]](https://npmjs.com/package/@otterhttp/send)
[![][web-badge]](https://tinyhttp.v1rtl.site/mw/send)

Extensions for sending a response, including `send`, `sendStatus`, `status`,
`sendFile` and `json`. Works with any backend framework that supports `async`/`await` middleware.
Extensions for sending a response, including `send`, `sendStatus`, `sendFile` and `json`.
Works with any backend framework that supports `async`/`await` middleware.

## Install

Expand Down Expand Up @@ -101,10 +100,9 @@ await res.sendFile('song.mp3', { root: process.cwd() })
import { createServer } from 'node:http'
import { send } from '@otterhttp/send'

createServer((req, res) => send(req, res)('Hello World')).listen(3000)
createServer((req, res) => send(res, 'Hello World')).listen(3000)
```

[npm-badge]: https://img.shields.io/npm/v/@otterhttp/send?style=flat-square
[dl-badge]: https://img.shields.io/npm/dt/@otterhttp/send?style=flat-square
[web-badge]: https://img.shields.io/badge/website-visit-hotpink?style=flat-square
[doc-badge]: https://img.shields.io/badge/-docs-hotpink?style=flat-square
[doc-badge]: https://img.shields.io/badge/-docs-blueviolet?style=flat-square

0 comments on commit 894dced

Please sign in to comment.