From d494f891ba74b7c5274ccf71d0e05e94f2824cbc Mon Sep 17 00:00:00 2001 From: Dirk Stolle Date: Tue, 13 Feb 2024 01:02:36 +0100 Subject: [PATCH] chore: fix some typos (#282) --- packages/degenerator/README.md | 4 ++-- packages/get-uri/README.md | 2 +- packages/get-uri/src/index.ts | 4 ++-- packages/pac-resolver/src/weekdayRange.ts | 2 +- packages/proxy/src/proxy.ts | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/degenerator/README.md b/packages/degenerator/README.md index 39845591..b1c3311b 100644 --- a/packages/degenerator/README.md +++ b/packages/degenerator/README.md @@ -44,7 +44,7 @@ function myFn() { } ``` -Now we can compile this into an asyncronous function, implement the +Now we can compile this into an asynchronous function, implement the async `get()` function, and finally evaluate it into a real JavaScript function instance with the `vm` module: @@ -87,4 +87,4 @@ API ### degenerator(code: string, names: Array): String -Returns a "degeneratorified" JavaScript string, with `async`/`await` transplanted. \ No newline at end of file +Returns a "degeneratorified" JavaScript string, with `async`/`await` transplanted. diff --git a/packages/get-uri/README.md b/packages/get-uri/README.md index d2f32ef0..e351ecd6 100644 --- a/packages/get-uri/README.md +++ b/packages/get-uri/README.md @@ -55,7 +55,7 @@ Cacheability When calling `getUri()` with the same URI multiple times, the `get-uri` module supports sending an indicator that the remote resource has not been modified -since the last time it has been retreived from that node process. +since the last time it has been retrieved from that node process. To do this, define a `cache` property on the "options object" argument with the value set to the `stream.Readable` instance that was previously diff --git a/packages/get-uri/src/index.ts b/packages/get-uri/src/index.ts index 22ac7e6f..6a8c4b4f 100644 --- a/packages/get-uri/src/index.ts +++ b/packages/get-uri/src/index.ts @@ -47,10 +47,10 @@ export function isValidProtocol(p: string): p is keyof Protocols { * * For caching purposes, you can pass in a `stream` instance from a previous * `getUri()` call as a `cache: stream` option, and if the destination has - * not changed since the last time the endpoint was retreived then the callback + * not changed since the last time the endpoint was retrieved then the callback * will be invoked with an Error object with `code` set to "ENOTMODIFIED" and * `null` for the "stream" instance argument. In this case, you can skip - * retreiving the file again and continue to use the previous payload. + * retrieving the file again and continue to use the previous payload. * * @param {String} uri URI to retrieve * @param {Object} opts optional "options" object diff --git a/packages/pac-resolver/src/weekdayRange.ts b/packages/pac-resolver/src/weekdayRange.ts index 7e4b033f..45706ff7 100644 --- a/packages/pac-resolver/src/weekdayRange.ts +++ b/packages/pac-resolver/src/weekdayRange.ts @@ -7,7 +7,7 @@ const weekdays: Weekday[] = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']; * Only the first parameter is mandatory. Either the second, the third, or both * may be left out. * - * If only one parameter is present, the function yeilds a true value on the + * If only one parameter is present, the function yields a true value on the * weekday that the parameter represents. If the string "GMT" is specified as * a second parameter, times are taken to be in GMT, otherwise in local timezone. * diff --git a/packages/proxy/src/proxy.ts b/packages/proxy/src/proxy.ts index 1c2d55d3..32a135c6 100644 --- a/packages/proxy/src/proxy.ts +++ b/packages/proxy/src/proxy.ts @@ -91,7 +91,7 @@ async function onrequest( if (!success) return requestAuthorization(req, res); } catch (_err: unknown) { const err = _err as Error; - // an error occured during login! + // an error occurred during login! res.writeHead(500); res.end((err.stack || err.message || err) + '\n'); return; @@ -401,7 +401,7 @@ async function onconnect( if (!success) return requestAuthorization(req, res); } catch (_err) { const err = _err as Error; - // an error occured during login! + // an error occurred during login! res.writeHead(500); res.end((err.stack || err.message || err) + '\n'); return;