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
Provenance
- Commit
e7b38ee- Tree
8ff4cf5- Author
Aidan <180043753+AidanAlsaadoun1@users.noreply.github.com>- Committer
GitHub <noreply@github.com>- Parent
eebdf7b
6 files changed+8 added−8 removed
modified:src/helper/cookie/index.test.ts+1 added-1 removed
312 unmodified lines313 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 linesmodified:src/helper/proxy/index.ts+1 added-1 removed
114 unmodified lines115 /**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 * @example79 unmodified linesmodified:src/helper/route/index.ts+3 added-3 removed
35 unmodified lines3637383940404142434416 unmodified lines6162636465656667686915 unmodified lines8586878889899091929348 unmodified lines35 unmodified lines/** * Get the route path registered within the handler * * @param {Context} c - The context object * @param {number} index - The index of the root from which to retrieve the path, similar to Array.prototype.at(), where a negative number is the index counted from the end of the matching root. Defaults to the current root index. * @param {number} index - The index of the route from which to retrieve the path, similar to Array.prototype.at(), where a negative number is the index counted from the end of the matching route. Defaults to the current route index. * @returns The route path registered within the handler * * @example * ```ts16 unmodified lines/** * Get the basePath of the as-is route specified by routing. * * @param {Context} c - The context object * @param {number} index - The index of the root from which to retrieve the path, similar to Array.prototype.at(), where a negative number is the index counted from the end of the matching root. Defaults to the current root index. * @param {number} index - The index of the route from which to retrieve the path, similar to Array.prototype.at(), where a negative number is the index counted from the end of the matching route. Defaults to the current route index. * @returns The basePath of the as-is route specified by routing. * * @example * ```ts15 unmodified lines/** * Get the basePath with embedded parameters * * @param {Context} c - The context object * @param {number} index - The index of the root from which to retrieve the path, similar to Array.prototype.at(), where a negative number is the index counted from the end of the matching root. Defaults to the current root index. * @param {number} index - The index of the route from which to retrieve the path, similar to Array.prototype.at(), where a negative number is the index counted from the end of the matching route. Defaults to the current route index. * @returns The basePath with embedded parameters. * * @example * ```ts48 unmodified linesmodified:src/utils/types.ts+1 added-1 removed
44 unmodified lines45 *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 */53 export type JSONParsed<T, TError = bigint | ReadonlyArray<bigint>> = T extends {67 unmodified linesmodified:src/context.ts+1 added-1 removed
769 unmodified lines770 ): 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 any19 unmodified linesmodified:README.md+1 added-1 removed
62 unmodified lines63 Contributions Welcome! You can contribute in the following ways.64 65 - 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.70 71 For more details, see [docs/CONTRIBUTING.md](docs/CONTRIBUTING.md).14 unmodified lines