Skip to content

Commit 9a8e984

Browse files
authored
chore: spelling and linting
2 parents babecfe + e0520f0 commit 9a8e984

22 files changed

+33
-24
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,15 @@ You can do `import { ... } from '@intlify/utils'` the above utilities
153153
- `tryPathLocale`
154154
- `tryQueryLocale`
155155

156-
The about utilies functions accpet Web APIs such as [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request) and [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) that is supported by JS environments (such as Deno, Bun, and Browser)
156+
The about utilities functions accept Web APIs such as [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request) and [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) that is supported by JS environments (such as Deno, Bun, and Browser)
157157

158158
#### Specialized environments
159159

160160
If you will use Node.js and H3, You can do `import { ... } from '@intlify/utils/{ENV}'` the above utilities.
161161

162162
The namespace `{ENV}` is one of the following:
163163

164-
- `node`: accpet `IncomingMessage` and `Outgoing` by Node.js [http](https://nodejs.org/api/http.html) module
164+
- `node`: accept `IncomingMessage` and `Outgoing` by Node.js [http](https://nodejs.org/api/http.html) module
165165
- `h3`: accept `H3Event` by HTTP framework [h3](https://github.com/unjs/h3)
166166
- `hono`: accept `Context` by edge-side web framework [hono](https://github.com/honojs/hono)
167167

deno/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,15 @@ You can do `import { ... } from '@intlify/utils'` the above utilities
153153
- `tryPathLocale`
154154
- `tryQueryLocale`
155155

156-
The about utilies functions accpet Web APIs such as [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request) and [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) that is supported by JS environments (such as Deno, Bun, and Browser)
156+
The about utilities functions accept Web APIs such as [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request) and [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) that is supported by JS environments (such as Deno, Bun, and Browser)
157157

158158
#### Specialized environments
159159

160160
If you will use Node.js and H3, You can do `import { ... } from '@intlify/utils/{ENV}'` the above utilities.
161161

162162
The namespace `{ENV}` is one of the following:
163163

164-
- `node`: accpet `IncomingMessage` and `Outgoing` by Node.js [http](https://nodejs.org/api/http.html) module
164+
- `node`: accept `IncomingMessage` and `Outgoing` by Node.js [http](https://nodejs.org/api/http.html) module
165165
- `h3`: accept `H3Event` by HTTP framework [h3](https://github.com/unjs/h3)
166166
- `hono`: accept `Context` by edge-side web framework [hono](https://github.com/honojs/hono)
167167

deno/locale.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ export type ParseScriptSubtag<
258258
> = Result
259259

260260
/**
261-
* paser unicode script subtag (EBNF: = alpha{4};)
261+
* parse unicode script subtag (EBNF: = alpha{4};)
262262
* https://unicode.org/reports/tr35/#unicode_script_subtag
263263
*/
264264
// TODO: Check if the script subtag is in CLDR

deno/shared.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ export function parseAcceptLanguage(value: string): string[] {
6464
}
6565

6666
/**
67-
* nomralize the language name
67+
* normalize the language name
6868
*
6969
* @description
7070
* This function normalizes the locale name defined in {@link https://www.gnu.org/software/gettext/manual/gettext.html#Locale-Names | gettext(libc) style} to {@link https://datatracker.ietf.org/doc/html/rfc4646#section-2.1 | BCP 47 language tag}
7171
*
7272
* @example
7373
* ```ts
7474
* const oldLangName = 'en_US'
75-
* const langTag = nomralizeLanguageName(oldLangName)
75+
* const langTag = normalizeLanguageName(oldLangName)
7676
* conosle.log(langTag) // en-US
7777
* ```
7878
*
@@ -131,7 +131,7 @@ export let pathLanguageParser: PathLanguageParser = /* #__PURE__*/ createPathInd
131131
/**
132132
* register the path language parser
133133
*
134-
* @description register a parser to be used in the `getPathLanugage` utility function
134+
* @description register a parser to be used in the `getPathLanguage` utility function
135135
*
136136
* @param {PathLanguageParser} parser the path language parser
137137
*/

deno/web.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export function getHeaderLanguages(
5454
/**
5555
* get language from header
5656
*
57-
* @description parse header string, default `accept-language`. if you use `accept-language`, this function retuns the **first language tag** of `accept-language` header.
57+
* @description parse header string, default `accept-language`. if you use `accept-language`, this function returns the **first language tag** of `accept-language` header.
5858
*
5959
* @example
6060
* example for Web API request on Deno:

playground/browser/browser.test.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import test from 'node:test'
33
import { createServer } from 'node:http'
44
import playwright from 'playwright'
55
import handler from 'serve-handler'
6+
import process from 'node:process'
67

78
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms))
89

playground/browser/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

playground/node/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { createServer } from 'node:http'
22
import { getHeaderLanguages } from '@intlify/utils/node'
3+
import process from 'node:process'
34

45
const server = createServer((req, res) => {
56
const languages = getHeaderLanguages(req)

playground/node/node.test.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import assert from 'node:assert'
22
import test from 'node:test'
33
import { spawn } from 'node:child_process'
44
import { fetch } from 'ofetch'
5+
import process from 'node:process'
56

67
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms))
78

scripts/bump-deno.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import semver from 'semver'
55
import { readPackageJSON } from 'pkg-types'
66

77
import type { ParseError } from 'jsonc-parser'
8+
import process from 'node:process'
89

910
async function main() {
1011
const npmPath = resolve(process.cwd(), 'package.json')

0 commit comments

Comments
 (0)