Skip to content
Myr

docs: fix typos in code comments and link third-party middleware section (#5343)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Aidan · committed by GitHub · parent eebdf7b · Browse files · 6 files+8 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

6 files+8 added−8 removed

  • tests:+1 added−1 removed
  • other:+7 added−7 removed

6 files+8 added−8 removed

modified:src/helper/cookie/index.test.ts+1 added-1 removed
312 unmodified lines
313 app.get('/set-signed-host-prefix-cookie', async (c) => {314 await setSignedCookie(c, 'delicious_cookie', 'macha', 'secret choco chips', {315 prefix: 'host',316 domain: 'example.com', // this will be ignored317 path: 'example.com', // thi will be ignored317 path: 'example.com', // this will be ignored318 secure: false, // this will be ignored319 })320 return c.text('Set host prefix cookie')321 })
189 unmodified lines
modified:src/helper/proxy/index.ts+1 added-1 removed
114 unmodified lines
115/**116 * Fetch API wrapper for proxy.117 * The parameters and return value are the same as for `fetch` (except for the proxy-specific options).118 *119 * The “Accept-Encoding” header is replaced with an encoding that the current runtime can handle.119 * The "Accept-Encoding" header is replaced with an encoding that the current runtime can handle.120 * Unnecessary response headers are deleted and a Response object is returned that can be returned121 * as is as a response from the handler.122 *123 * @example
79 unmodified lines
modified:src/helper/route/index.ts+3 added-3 removed
modified:src/utils/types.ts+1 added-1 removed
44 unmodified lines
45 *46 * `JSON.stringify()` throws a `TypeError` when it encounters a `bigint` value,47 * unless a custom `replacer` function or `.toJSON()` method is provided.48 *49 * This behaviour can be controlled by the `TError` generic type parameter,49 * This behavior can be controlled by the `TError` generic type parameter,50 * which defaults to `bigint | ReadonlyArray<bigint>`.51 * You can set it to `never` to disable this check.52 */53export type JSONParsed<T, TError = bigint | ReadonlyArray<bigint>> = T extends {
67 unmodified lines
modified:src/context.ts+1 added-1 removed
769 unmodified lines
770 ): Response & TypedResponse<undefined, T, 'redirect'> => {771 const locationString = String(location)772 this.header(773 'Location',774 // Multibyes should be encoded774 // Multibytes should be encoded775 // eslint-disable-next-line no-control-regex776 !/[^\x00-\xFF]/.test(locationString) ? locationString : encodeURI(locationString)777 )778 return this.newResponse(null, status ?? 302) as any
19 unmodified lines
modified:README.md+1 added-1 removed
62 unmodified lines
63Contributions Welcome! You can contribute in the following ways.6465- Create an Issue - Propose a new feature. Report a bug.66- Pull Request - Fix a bug or typo. Refactor the code.67- Create third-party middleware - See instructions below.67- Create third-party middleware - See [Third-party middleware](docs/CONTRIBUTING.md#third-party-middleware).68- Share - Share your thoughts on the Blog, X, and others.69- Make your application - Please try to use Hono.7071For more details, see [docs/CONTRIBUTING.md](docs/CONTRIBUTING.md).
14 unmodified lines