open-index/open-npm huggingface dataset:
npm package: @hoajs/adapter
Description: Adapters for Hoa.
Author: nswbmw
Latest version: 0.1.3

## @hoajs/adapter

Adapters for Hoa.

## Installation

```bash
$ npm i @hoajs/adapter --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { nodeServer } from '@hoajs/adapter'

const app = new Hoa()
app.extend(nodeServer())

app.use(async (ctx, next) => {
  ctx.res.body = `Hello, Hoa!`
})

app.listen(3000)
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/adapter/node.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/basic-auth
Description: Basic Authentication middleware for Hoa.
Author: RosApr
Latest version: 0.1.1

## @hoajs/basic-auth

Basic Authentication middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/basic-auth --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { basicAuth } from '@hoajs/basic-auth'

const app = new Hoa()
app.use(basicAuth({
  username: 'admin',
  password: '123456'
}))

app.use(async (ctx) => {
  ctx.res.body = `Hello, Hoa!`
})

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/basic-auth.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/bodyparser
Description: Body parser middleware for Hoa.
Author: nswbmw
Latest version: 0.1.3

## @hoajs/bodyparser

Body parser middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/bodyparser --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { bodyParser } from '@hoajs/bodyparser'

const app = new Hoa()
app.use(bodyParser())

app.use(async (ctx) => {
  ctx.res.body = ctx.req.body
})

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/bodyparser.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/cache
Description: Cache middleware for Hoa.
Author: nswbmw
Latest version: 0.1.1

## @hoajs/cache

Cache middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/cache --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { cache } from '@hoajs/cache'

const app = new Hoa()
app.use(cache())

app.use(async (ctx) => {
  ctx.res.body = `Hello, Hoa!`
})

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/cache.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/cloudflare-rate-limit
Description: Cloudflare rate limiter middleware for Hoa.
Author: nswbmw
Latest version: 0.2.1

## @hoajs/cloudflare-rate-limit

Cloudflare Rate Limit middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/cloudflare-rate-limit --save
```

## Quick Start

### RateLimiter (using Cloudflare native Rate Limiting API)

```js
import { Hoa } from 'hoa'
import { RateLimiter } from '@hoajs/cloudflare-rate-limit'

const app = new Hoa()

app.use(RateLimiter({
  binding: 'RATE_LIMITER',
  keyGenerator: (ctx) => ctx.req.ip
}))

app.use(async (ctx) => {
  ctx.res.body = 'Hello, Hoa!'
})

export default app
```

### KVRateLimiter (using Cloudflare KV)

```js
import { Hoa } from 'hoa'
import { KVRateLimiter } from '@hoajs/cloudflare-rate-limit'

const app = new Hoa()

app.use(KVRateLimiter({
  binding: 'KV',
  prefix: 'ratelimit:',
  limit: 3,
  period: 60,
  interval: 10,
  keyGenerator: (ctx) => ctx.req.ip
}))

app.use(async (ctx) => {
  ctx.res.body = 'Hello, Hoa!'
})

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/ratelimit/cloudflare-rate-limit.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/combine
Description: Combine middleware for Hoa.
Author: RosApr
Latest version: 0.1.1

## @hoajs/combine

Combine middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/combine --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { every, some } from '@hoajs/combine'
import { RateLimiter } from '@hoajs/cloudflare-rate-limit'
import { basicAuth } from '@hoajs/basic-auth'
import { ip } from '@hoajs/ip'

const app = new Hoa()

app.use(
  some(
    every(
      ip({ allowList: ['192.168.0.2'] }),
      basicAuth({ username: 'admin', password: '123456' })
    ),
    // If both conditions are met, RateLimiter will not execute.
    RateLimiter(...)
  )
)

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/combine.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/compress
Description: Compress middleware for Hoa.
Author: nswbmw
Latest version: 0.1.2

## @hoajs/compress

Compress middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/compress --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { compress } from '@hoajs/compress'

const app = new Hoa()
app.use(compress())

app.use(async (ctx) => {
  ctx.res.body = 'Hello, Hoa!'
})

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/compress.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/context-storage
Description: Context storage middleware for Hoa.
Author: nswbmw
Latest version: 0.1.2

## @hoajs/context-storage

Context storage middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/context-storage --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { contextStorage, getContext } from '@hoajs/context-storage'

const app = new Hoa()
app.use(contextStorage())

app.use(async (ctx, next) => {
  ctx.state.requestId = crypto.randomUUID()
  await next()
})

app.use(async (ctx, next) => {
  log('Request start')
  await doSomething()
  log('Request end')
})

function log (msg) {
  const ctx = getContext()
  console.log(`[${ctx.state.requestId}] ${msg}`)
}

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/context-storage.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/cookie
Description: Cookie middleware for Hoa.
Author: nswbmw
Latest version: 0.1.2

## @hoajs/cookie

Cookie middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/cookie --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { cookie } from '@hoajs/cookie'

const app = new Hoa()
app.extend(cookie())

app.use(async (ctx) => {
  const name = await ctx.req.getCookie('name')
  ctx.res.body = `Hello, ${name}!`
})

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/cookie.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/cors
Description: CORS middleware for Hoa.
Author: nswbmw
Latest version: 0.1.3

## @hoajs/cors

CORS middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/cors --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { cors } from '@hoajs/cors'

const app = new Hoa()
app.use(cors())

app.use(async (ctx) => {
  ctx.res.body = 'Hello, Hoa!'
})

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/cors.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/csrf
Description: CSRF middleware for Hoa.
Author: RosApr
Latest version: 0.1.2

## @hoajs/csrf

CSRF middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/csrf --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { csrf } from '@hoajs/csrf'

const app = new Hoa()
app.use(csrf())

app.use(async (ctx) => {
  ctx.res.body = `Hello, Hoa!`
})

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/csrf.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/etag
Description: ETag middleware for Hoa.
Author: RosApr
Latest version: 0.1.2

## @hoajs/etag

ETag middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/etag --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { etag } from '@hoajs/etag'

const app = new Hoa()
app.use(etag())

app.use(async (ctx) => {
  ctx.res.body = `Hello, Hoa!`
})

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/etag.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/favicon
Description: Favicon middleware for Hoa.
Author: nswbmw
Latest version: 0.1.1

## @hoajs/favicon

Favicon middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/favicon --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { favicon } from '@hoajs/favicon'

const app = new Hoa()
app.use(favicon())

app.use(async (ctx) => {
  ctx.res.body = 'Hello, Hoa!'
})

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/favicon.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/formidable
Description: Formidable middleware for Hoa.
Author: RosApr
Latest version: 0.1.0

## @hoajs/formidable

Formidable middleware for Hoa. Parses `multipart/form-data` requests using [formidable](https://github.com/node-formidable/formidable), designed for use with `@hoajs/adapter` in Node.js environment.

## Installation

```bash
$ npm i @hoajs/formidable --save
```

## Quick Start

```ts
import { Hoa } from 'hoa'
import { nodeServer } from '@hoajs/adapter'
import { hoaFormidable } from '@hoajs/formidable'

const app = new Hoa()
app.extend(nodeServer())
app.use(hoaFormidable())

app.use(async (ctx) => {
  const fields = ctx.req.body   // parsed form fields
  const files = ctx.req.files   // uploaded files
  ctx.res.body = { fields, files }
})

app.listen(3000)
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/formidable.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/ip
Description: IP restriction middleware for Hoa.
Author: nswbmw
Latest version: 0.1.2

## @hoajs/ip

IP restriction middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/ip --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { ip } from '@hoajs/ip'

const app = new Hoa()

app.use(ip({
  // By default, client IP is read from 'CF-Connecting-IP' header.
  // getIp: (ctx) => ctx.req.get('CF-Connecting-IP'),
  allowList: ['127.0.0.1', '::1'],
  denyList: ['203.0.113.0/24', /1.2.3.[0-9]{1,3}/],
  denyHandler: (ctx) => ctx.throw(403, 'Forbidden')
}))

app.use(async (ctx) => {
  ctx.res.body = 'Hello, Hoa!'
})

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/ip.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/json
Description: JSON response formatting middleware for Hoa.
Author: nswbmw
Latest version: 0.2.3

## @hoajs/json

JSON response formatting middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/json --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { json } from '@hoajs/json'

const app = new Hoa()
app.use(json())

app.use(async (ctx) => {
  ctx.res.body = 'Hello, Hoa!'
})

export default app
```

Response:

```js
{
  code: 200,
  data: 'Hello, Hoa!'
}
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/json.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/jwt
Description: JSON Web Token(JWT) middleware for Hoa.
Author: nswbmw
Latest version: 0.1.2

## @hoajs/jwt

JSON Web Token(JWT) middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/jwt --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { jwt } from '@hoajs/jwt'

const app = new Hoa()
app.use(jwt({ secret: 'shhhh' }))

app.use(async (ctx) => {
  ctx.res.body = `Hello, ${ctx.state.user.name}!`
})

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/jwt.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/language
Description: Language detector middleware for Hoa.
Author: RosApr
Latest version: 0.1.1

## @hoajs/language

Language detector middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/language --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { cookie } from '@hoajs/cookie'
import { language } from '@hoajs/language'

const app = new Hoa()
app.extend(cookie())
app.use(language())

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/language.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/logger
Description: Logger middleware for Hoa.
Author: nswbmw
Latest version: 0.1.2

## @hoajs/logger

Logger middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/logger --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { logger } from '@hoajs/logger'

const app = new Hoa()
app.use(logger())

app.use(async (ctx) => {
  ctx.res.body = 'Hello, Hoa!'
})

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/logger.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/method-override
Description: Method Override Middleware for Hoa.
Author: nswbmw
Latest version: 0.1.1

## @hoajs/method-override

Method Override Middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/method-override --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { methodOverride } from '@hoajs/method-override'

const app = new Hoa()
app.use(methodOverride())

app.use(async (ctx) => {
  ctx.res.body = ctx.req.method
})

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/method-override.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/mustache
Description: A Mustache-based view renderer for Hoa.
Author: nswbmw
Latest version: 0.1.1

## @hoajs/mustache

A Mustache-based view renderer for Hoa.

## Installation

```bash
$ npm i @hoajs/mustache --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { mustache} from '@hoajs/mustache'

const app = new Hoa()
app.extend(mustache())

const userTemplate = '<p>Hello, my name is {{name}}. I have {{kids.length}} kids:</p><ul>{{#kids}}{{> kid}}{{/kids}}</ul>'
const kidTemplate = '<li>{{name}} is {{age}}</li>'

app.use(async (ctx) => {
  const html = ctx.render(
    userTemplate,
    {
      name: 'David',
      kids: [
        { name: 'Jack', age: 18 },
        { name: 'John', age: 20 }
      ]
    },
    {
      kid: kidTemplate
    }
  )

  ctx.res.body = html
})

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/view/mustache.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/nana
Description: Nana validator middleware for Hoa.
Author: nswbmw
Latest version: 0.1.2

## @hoajs/nana

Nana validator middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/nana --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { router } from '@hoajs/router'
import { nanaValidator } from '@hoajs/nana'
import { object, string, number } from 'nana'

const app = new Hoa()
app.extend(router())

app.get(
  '/users/:name',
  nanaValidator({
    params: object({
      name: string(),
      age: number()
    })
    // query: object({...}),
    // headers: object({...}),
    // body: object({...}),
    // ...
  }),
  async (ctx) => {
    const name = ctx.req.params.name
    ctx.res.body = `Hello, ${name}!`
  }
)

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/validator/nana.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/powered-by
Description: PoweredBy middleware for Hoa.
Author: RosApr
Latest version: 0.1.1

## @hoajs/powered-by

PoweredBy middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/powered-by --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { poweredBy } from '@hoajs/powered-by'

const app = new Hoa()
app.use(poweredBy('MyApp'))

app.use(async (ctx) => {
  ctx.res.body = `Hello, Hoa!`
})

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/powered-by.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/request-id
Description: Request ID middleware for Hoa.
Author: nswbmw
Latest version: 0.1.3

## @hoajs/request-id

Request ID middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/request-id --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { requestId } from '@hoajs/request-id'

const app = new Hoa()
app.use(requestId())

app.use(async (ctx) => {
  ctx.res.body = `Hello, ${ctx.state.requestId}!`
})

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/request-id.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/response-time
Description: Response-Time middleware for Hoa.
Author: nswbmw
Latest version: 0.1.3

## @hoajs/response-time

Response-Time middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/response-time --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { responseTime } from '@hoajs/response-time'

const app = new Hoa()
app.use(responseTime())

app.use(async (ctx) => {
  ctx.res.body = 'Hello, Hoa!'
})

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/response-time.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/router
Description: Router middleware for Hoa.
Author: nswbmw
Latest version: 0.3.1

## @hoajs/router

Router middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/router --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { router } from '@hoajs/router'

const app = new Hoa()
app.extend(router())

app.get('/users/:name', async (ctx, next) => {
  ctx.res.body = `Hello, ${ctx.req.params.name}!`
})

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/router/router.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/secure-headers
Description: SecureHeaders middleware for Hoa.
Author: RosApr
Latest version: 0.1.1

## @hoajs/secure-headers

SecureHeaders middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/secure-headers --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { secureHeaders } from '@hoajs/secure-headers'

const app = new Hoa()
app.use(secureHeaders())

app.use(async (ctx) => {
  ctx.res.body = `Hello, Hoa!`
})

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/secure-headers.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/sentry
Description: Sentry middleware for Hoa.
Author: nswbmw
Latest version: 0.1.1

## @hoajs/sentry

Sentry middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/sentry --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { sentry } from '@hoajs/sentry'

const app = new Hoa()
app.use(sentry({ dsn: 'xxx' }))

app.use(async (ctx) => {
  ctx.throw(400, 'Some error')
})

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/debug/sentry.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/timeout
Description: Timeout middleware for Hoa.
Author: nswbmw
Latest version: 0.1.1

## @hoajs/timeout

Timeout middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/timeout --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { timeout } from '@hoajs/timeout'

const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms))

const app = new Hoa()
app.use(timeout(5000))

app.use(async (ctx) => {
  await delay(6000)
  ctx.res.body = 'Hello, Hoa!'
})

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/timeout.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/tiny-router
Description: Tiny router middleware for Hoa.
Author: nswbmw
Latest version: 0.1.1

## @hoajs/tiny-router

Tiny router middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/tiny-router --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { tinyRouter } from '@hoajs/tiny-router'

const app = new Hoa()
app.extend(tinyRouter())

app.get('/users/:name', async (ctx, next) => {
  ctx.res.body = `Hello, ${ctx.req.params.name}!`
})

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/router/tiny-router.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/valibot
Description: Valibot validator middleware for Hoa.
Author: nswbmw
Latest version: 0.1.1

## @hoajs/valibot

Valibot validator middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/valibot --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { router } from '@hoajs/router'
import { v, valibotValidator } from '@hoajs/valibot'

const app = new Hoa()
app.extend(router())

app.get(
  '/users/:name',
  valibotValidator({
    params: v.object({
      name: v.string()
    }),
    // query: v.object({...}),
    // headers: v.object({...}),
    // body: v.object({...}),
    // ...
  }),
  async (ctx) => {
    const name = ctx.req.params.name
    ctx.res.body = `Hello, ${name}!`
  }
)

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/validator/valibot.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/vary
Description: Vary middleware for Hoa.
Author: nswbmw
Latest version: 0.1.1

## @hoajs/vary

Vary middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/vary --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { vary } from '@hoajs/vary'

const app = new Hoa()
app.extend(vary())

app.use(async (ctx, next) => {
  ctx.res.vary('Accept')
  ctx.res.body = 'Hello, Hoa!'
})

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/vary.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT
npm package: @hoajs/zod
Description: Zod validator middleware for Hoa.
Author: nswbmw
Latest version: 0.1.1

## @hoajs/zod

Zod validator middleware for Hoa.

## Installation

```bash
$ npm i @hoajs/zod --save
```

## Quick Start

```js
import { Hoa } from 'hoa'
import { router } from '@hoajs/router'
import { z, zodValidator } from '@hoajs/zod'

const app = new Hoa()
app.extend(router())

app.get(
  '/users/:name',
  zodValidator({
    params: z.object({
      name: z.string()
    }),
    // query: z.object({...}),
    // headers: z.object({...}),
    // body: z.object({...}),
    // ...
  }),
  async (ctx) => {
    const name = ctx.req.params.name
    ctx.res.body = `Hello, ${name}!`
  }
)

export default app
```

## Documentation

The documentation is available on [hoa-js.com](https://hoa-js.com/middleware/validator/zod.html)

## Test (100% coverage)

```sh
$ npm test
```

## License

MIT