0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-24 11:07:29 +01:00

chore: update comments in codes (#3145)

This commit is contained in:
Yusuke Wada 2024-07-16 21:50:27 +09:00 committed by GitHub
parent 1cee728193
commit 1afecac402
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 9 deletions

View File

@ -1,3 +1,8 @@
/**
* @module
* Combine Middleware for Hono.
*/
import type { Context } from '../../context'
import type { MiddlewareHandler, Next } from '../../types'
import { TrieRouter } from '../../router/trie-router'
@ -18,8 +23,8 @@ type Condition = (c: Context) => boolean
*
* @example
* ```ts
* import { some } from 'combine'
* import { bearerAuth } from 'bearer-auth'
* import { some } from 'hono/combine'
* import { bearerAuth } from 'hono/bearer-auth'
* import { myRateLimit } from '@/rate-limit'
*
* // If client has a valid token, then skip rate limiting.
@ -67,8 +72,8 @@ export const some = (...middleware: (MiddlewareHandler | Condition)[]): Middlewa
*
* @example
* ```ts
* import { some, every } from 'combine'
* import { bearerAuth } from 'bearer-auth'
* import { some, every } from 'hono/combine'
* import { bearerAuth } from 'hono/bearer-auth'
* import { myCheckLocalNetwork } from '@/check-local-network'
* import { myRateLimit } from '@/rate-limit'
*
@ -110,8 +115,8 @@ export const every = (...middleware: (MiddlewareHandler | Condition)[]): Middlew
*
* @example
* ```ts
* import { except } from 'combine'
* import { bearerAuth } from 'bearer-auth
* import { except } from 'hono/combine'
* import { bearerAuth } from 'hono/bearer-auth
*
* // If client is accessing public API, then skip authentication.
* // Otherwise, require a valid token.

View File

@ -1,5 +1,5 @@
/**
* Middleware for restrict IP Address
* IP Restriction Middleware for Hono
* @module
*/
@ -113,7 +113,7 @@ const buildMatcher = (
}
/**
* Rules for IP Limit Middleware
* Rules for IP Restriction Middleware
*/
export interface IPRestrictionRules {
denyList?: IPRestrictionRule[]
@ -121,7 +121,7 @@ export interface IPRestrictionRules {
}
/**
* IP Limit Middleware
* IP Restriction Middleware
*
* @param getIP function to get IP Address
*/