diff --git a/Releases.md b/Releases.md index 40549d9d3c..da6720e2f9 100644 --- a/Releases.md +++ b/Releases.md @@ -408,7 +408,7 @@ Changes in std version 0.69.0: - fix: Don't expose globalThis.__bootstrap (#7344) - fix: Handle bad redirects more gracefully (#7342) - fix: Handling of + character in URLSearchParams (#7314) -- fix: Regex for TS refereces and deno-types (#7333) +- fix: Regex for TS references and deno-types (#7333) - fix: Set maximum size of thread pool to 31 (#7290) - fix: Support missing features in --no-check (#7289) - fix: Use millisecond precision for Deno.futime and Deno.utime (#7299) @@ -629,7 +629,7 @@ Changes in std version 0.61.0: - fix(std/http): Properly return port 80 in \_parseAddrFromStr (#6635) - fix(std/mime): Boundary random hex values (#6646) - fix(std/node): Add encoding argument to Buffer.byteLength (#6639) -- fix(std/tesing/asserts): AssertEquals/NotEquals should use milliseconds in +- fix(std/testing/asserts): AssertEquals/NotEquals should use milliseconds in Date (#6644) - fix(std/wasi): Return errno::success from fd_tell (#6636) @@ -1128,7 +1128,7 @@ Read more about this release at https://deno.land/v1 ### v0.41.0 / 2020.04.16 - BREAKING: Improve readdir() and FileInfo interfaces (#4763) -- BREAKING: Remove depracated APIs for mkdir and mkdirSync (#4615) +- BREAKING: Remove deprecated APIs for mkdir and mkdirSync (#4615) - BREAKING: Make fetch API more web compatible (#4687) - BREAKING: Remove std/testing/format.ts (#4749) - BREAKING: Migrate std/types to deno.land/x/types/ (#4713, #4771) @@ -1282,7 +1282,7 @@ Read more about this release at https://deno.land/v1 - feat: Add Deno.umask (#4290) - feat: Add global --quiet flag (#4135) - feat: Improvements to std/flags. (#4279) -- feat: Make internel error frames dimmer (#4201) +- feat: Make internal error frames dimmer (#4201) - feat: Support async function and EventListenerObject as listeners (#4240) - feat: add actual error class to fail message (#4305) - feat: seek should return cursor position (#4211) @@ -1310,7 +1310,7 @@ Read more about this release at https://deno.land/v1 - refactor: Rename Option -> Options (#4226) - refactor: cleanup compiler runtimes (#4230) - refactor: preliminary cleanup of Deno.runTests() (#4237) -- refactor: reduce unnecesarry output in cli/js tests (#4182) +- refactor: reduce unnecessary output in cli/js tests (#4182) - refactor: reorganize cli/js (#4317, #4316, #4310, #4250, #4302, #4283, #4264) - refactor: rewrite testPerm into unitTest (#4231) - refactor: uncomment tests broken tests, use skip (#4311) @@ -1605,7 +1605,7 @@ Read more about this release at https://deno.land/v1 - feat: Add ResourceTable in core (#3150) - feat: Re-enable standard stream support for fetch bodies (#3192) - feat: Add CustomInspect for Headers (#3130) -- fix: Cherry-pick depot_tools 6a1d778 to fix macOS Cataliona issues (#3175) +- fix: Cherry-pick depot_tools 6a1d778 to fix macOS Catalina issues (#3175) - fix: Remove runtime panics in op dispatch (#3176, #3202, #3131) - fix: BufReader.readString to actually return Deno.EOF at end (#3191) - perf: faster TextDecoder (#3180, #3204) @@ -1986,7 +1986,7 @@ In deno: In deno_std - Clean up HTTP async iterator code (denoland/deno_std#411) -- fix: add exnext lib to tsconfig.json (denoland/deno_std#416) +- fix: add esnext lib to tsconfig.json (denoland/deno_std#416) - feat(fs): add copy/copySync (denoland/deno_std#278) - feat: add Tar and Untar classes (denoland/deno_std#388) - ws: make acceptable() more robust (denoland/deno_std#404) diff --git a/cli/dts/README.md b/cli/dts/README.md index 006282a90f..9d07188f7d 100644 --- a/cli/dts/README.md +++ b/cli/dts/README.md @@ -4,7 +4,7 @@ The files in this directory are mostly from the TypeScript repository. We currently (unfortunately) have a rather manual process for upgrading TypeScript. It works like this currently: -1. Checkout typescript repo in a seperate directory. +1. Checkout typescript repo in a separate directory. 2. Copy typescript.js into Deno repo. 3. Copy d.ts files into dts directory. diff --git a/cli/tests/DenoWinRunner.cs b/cli/tests/DenoWinRunner.cs index 7879d146dd..2f9e9f89fe 100644 --- a/cli/tests/DenoWinRunner.cs +++ b/cli/tests/DenoWinRunner.cs @@ -31,7 +31,7 @@ public class DenoWinRunner /// /// Path to the Deno.exe file. Can be absolute or relative /// Path to the script file Deno should run. - /// The contrainsts to apply to the Deno process + /// The constraints to apply to the Deno process /// How long to wait for the Deno process to exit /// The deno.exe exit code, or an exit code provided by the test runner public static int RunDenoScript(string pathToDenoExe, string pathToTestScript, DenoConstraints constraints, uint timeoutMilliseconds = 1000) @@ -66,7 +66,7 @@ public class DenoWinRunner { SetStdHandle(STD_INPUT_HANDLE, (IntPtr)null); } - + if (constraints.HasFlag(DenoConstraints.NoStdout)) { SetStdHandle(STD_OUTPUT_HANDLE, (IntPtr)null); @@ -76,13 +76,13 @@ public class DenoWinRunner { SetStdHandle(STD_ERROR_HANDLE, (IntPtr)null); } - + Process process = new Process { StartInfo = startInfo }; process.Start(); - Task stdErrTask = startInfo.RedirectStandardError ? + Task stdErrTask = startInfo.RedirectStandardError ? process.StandardError.ReadToEndAsync() : Task.FromResult(null); - Task stdOutTask = startInfo.RedirectStandardOutput ? + Task stdOutTask = startInfo.RedirectStandardOutput ? process.StandardOutput.ReadToEndAsync() : Task.FromResult(null); if (!process.WaitForExit((int)timeoutMilliseconds)) @@ -124,4 +124,4 @@ public class DenoWinRunner return -1; } } -} \ No newline at end of file +} diff --git a/cli/tests/echo_server.ts b/cli/tests/echo_server.ts index fc8afa9812..fcb157fdb2 100644 --- a/cli/tests/echo_server.ts +++ b/cli/tests/echo_server.ts @@ -4,7 +4,7 @@ const listener = Deno.listen({ hostname, port: Number(port) }); console.log("listening on", addr); listener.accept().then( async (conn): Promise => { - console.log("recieved bytes:", await Deno.copy(conn, conn)); + console.log("received bytes:", await Deno.copy(conn, conn)); conn.close(); listener.close(); }, diff --git a/cli/tests/tls/README.md b/cli/tests/tls/README.md index 34de47dead..19bbaec35d 100644 --- a/cli/tests/tls/README.md +++ b/cli/tests/tls/README.md @@ -43,5 +43,5 @@ For testing purposes we need following files: - `RootCA.crt` - `RootCA.key` - `RootCA.pem` -- `locahost.crt` -- `locahost.key` +- `localhost.crt` +- `localhost.key` diff --git a/core/Cargo.toml b/core/Cargo.toml index 21cc5f1f7b..c8f35aab19 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -34,6 +34,6 @@ path = "examples/http_bench_bin_ops.rs" name = "http_bench_json_ops" path = "examples/http_bench_json_ops.rs" -# These dependendencies are only used for the 'http_bench_*_ops' examples. +# These dependencies are only used for the 'http_bench_*_ops' examples. [dev-dependencies] tokio = { version = "0.3.5", features = ["full"] } diff --git a/docs/contributing/release_schedule.md b/docs/contributing/release_schedule.md index e48bc2ae9a..8aabac9c8a 100644 --- a/docs/contributing/release_schedule.md +++ b/docs/contributing/release_schedule.md @@ -22,7 +22,7 @@ canary release by running: deno upgrade --canary ``` -To update to a specifc canary, pass the commit has in the `--version` option: +To update to a specific canary, pass the commit has in the `--version` option: ``` deno upgrade --canary --version=973af61d8bb03c1709f61e456581d58386ed4952 diff --git a/docs/contributing/style_guide.md b/docs/contributing/style_guide.md index 3f190ecf3b..d834ea91a8 100644 --- a/docs/contributing/style_guide.md +++ b/docs/contributing/style_guide.md @@ -283,7 +283,7 @@ comment. If it needs further comments it is not a good example. Currently, the building process uses `dlint` to validate linting problems in the code. If the task requires code that is non-conformant to linter use -`deno-lint-ignore ` directive to supress the warning. +`deno-lint-ignore ` directive to suppress the warning. ```typescript // deno-lint-ignore no-explicit-any @@ -349,7 +349,7 @@ export function foo(): string { programs can rely on. We want to guarantee to users that this code does not include potentially unreviewed third party code. -#### Document and maintain browser compatiblity. +#### Document and maintain browser compatibility. If a module is browser compatible, include the following in the JSDoc at the top of the module: diff --git a/docs/examples/import_export.md b/docs/examples/import_export.md index e87980bc76..1fa194d0c1 100644 --- a/docs/examples/import_export.md +++ b/docs/examples/import_export.md @@ -63,7 +63,7 @@ from a locally stored arithmetic module. The same functionality can be created by importing `add` and `multiply` methods from a remote module too. In this case the Ramda module is referenced, including the version number. Also -note a JavaScript module is imported directly into a TypeSript module, Deno has +note a JavaScript module is imported directly into a TypeScript module, Deno has no problem handling this. **Command:** `deno run ./remote.ts` @@ -115,6 +115,6 @@ export function multiply(a: number, b: number): number { ``` All functions, classes, constants and variables which need to be accessible -inside external modules must be exported. Either by prepending them with the +inside external modules must be exported. Either by pretending them with the `export` keyword or including them in an export statement at the bottom of the file. diff --git a/docs/runtime/workers.md b/docs/runtime/workers.md index 019df72012..5dcf059155 100644 --- a/docs/runtime/workers.md +++ b/docs/runtime/workers.md @@ -11,7 +11,7 @@ the `type: "module"` option when creating a new worker. Relative module specifiers are [not supported](https://github.com/denoland/deno/issues/5216) at the moment. You -can instead use the `URL` contructor and `import.meta.url` to easily create a +can instead use the `URL` constructor and `import.meta.url` to easily create a specifier for some nearby script. ```ts diff --git a/docs/tools/linter.md b/docs/tools/linter.md index 709e0d644c..4e432034b4 100644 --- a/docs/tools/linter.md +++ b/docs/tools/linter.md @@ -106,7 +106,7 @@ function foo(): any { } ``` -Ignore directive must be placed before first stament or declaration: +Ignore directive must be placed before first statement or declaration: ```ts // Copyright 2020 the Deno authors. All rights reserved. MIT license. diff --git a/op_crates/fetch/11_streams.js b/op_crates/fetch/11_streams.js index c3fa6cb6f0..69787d24a7 100644 --- a/op_crates/fetch/11_streams.js +++ b/op_crates/fetch/11_streams.js @@ -2482,7 +2482,7 @@ try { transformStreamDefaultControllerEnqueue( controller, - // it defaults to no tranformation, so I is assumed to be O + // it defaults to no transformation, so I is assumed to be O chunk, ); } catch (e) { diff --git a/op_crates/fetch/20_headers.js b/op_crates/fetch/20_headers.js index c2ae72864c..4202bea41d 100644 --- a/op_crates/fetch/20_headers.js +++ b/op_crates/fetch/20_headers.js @@ -237,10 +237,10 @@ set(name, value) { requiredArguments("Headers.set", arguments.length, 2); - const [newname, newvalue] = normalizeParams(name, value); - validateName(newname); - validateValue(newvalue); - dataSet(this[headersData], newname, newvalue); + const [newName, newValue] = normalizeParams(name, value); + validateName(newName); + validateValue(newValue); + dataSet(this[headersData], newName, newValue); } get [Symbol.toStringTag]() { diff --git a/op_crates/web/03_global_interfaces.js b/op_crates/web/03_global_interfaces.js index 7ade64cc1a..21a44eb8e3 100644 --- a/op_crates/web/03_global_interfaces.js +++ b/op_crates/web/03_global_interfaces.js @@ -1,7 +1,7 @@ ((window) => { const { EventTarget } = window; - const illegalConstructorKey = Symbol("illegalConstuctorKey"); + const illegalConstructorKey = Symbol("illegalConstructorKey"); class Window extends EventTarget { constructor(key = null) { diff --git a/std/datetime/mod.ts b/std/datetime/mod.ts index 2afddbe6f7..72f8cc6815 100644 --- a/std/datetime/mod.ts +++ b/std/datetime/mod.ts @@ -84,13 +84,13 @@ export function weekOfYear(date: Date): number { } /** - * Parse a date to return a IMF formated string date + * Parse a date to return a IMF formatted string date * RFC: https://tools.ietf.org/html/rfc7231#section-7.1.1.1 * IMF is the time format to use when generating times in HTTP * headers. The time being formatted must be in UTC for Format to * generate the correct format. * @param date Date to parse - * @return IMF date formated string + * @return IMF date formatted string */ export function toIMF(date: Date): string { function dtPad(v: string, lPad = 2): string { @@ -233,16 +233,16 @@ function calculateMonthsDifference(bigger: number, smaller: number): number { const smallerDate = new Date(smaller); const yearsDiff = biggerDate.getFullYear() - smallerDate.getFullYear(); const monthsDiff = biggerDate.getMonth() - smallerDate.getMonth(); - const calendarDiffrences = Math.abs(yearsDiff * 12 + monthsDiff); + const calendarDifferences = Math.abs(yearsDiff * 12 + monthsDiff); const compareResult = biggerDate > smallerDate ? 1 : -1; biggerDate.setMonth( - biggerDate.getMonth() - compareResult * calendarDiffrences, + biggerDate.getMonth() - compareResult * calendarDifferences, ); const isLastMonthNotFull = biggerDate > smallerDate ? 1 : -1 === -compareResult ? 1 : 0; - const months = compareResult * (calendarDiffrences - isLastMonthNotFull); + const months = compareResult * (calendarDifferences - isLastMonthNotFull); return months === 0 ? 0 : months; } diff --git a/std/datetime/test.ts b/std/datetime/test.ts index 3e42365ca8..0ff70603df 100644 --- a/std/datetime/test.ts +++ b/std/datetime/test.ts @@ -357,8 +357,8 @@ Deno.test({ name: "[std/datetime] difference", fn(): void { const denoInit = new Date("2018/5/14"); - const denoRelaseV1 = new Date("2020/5/13"); - let difference = datetime.difference(denoRelaseV1, denoInit, { + const denoReleaseV1 = new Date("2020/5/13"); + let difference = datetime.difference(denoReleaseV1, denoInit, { units: ["days", "months", "years"], }); assertEquals(difference.days, 730); diff --git a/std/encoding/README.md b/std/encoding/README.md index edfbeacc5d..3c60c6fcd2 100644 --- a/std/encoding/README.md +++ b/std/encoding/README.md @@ -187,7 +187,7 @@ function is as follows: | :--: | :--------: | :--------: | | Deno | rust | typescript | -- **`options`** are options for the delimiter-seprated output. +- **`options`** are options for the delimiter-separated output. - **`headers?: boolean`**: Whether or not to include the row of headers. Default: `true` @@ -538,18 +538,18 @@ console.log(encode(binaryData)); // => LpTqp ``` -### Specifying a standard and delimeter +### Specifying a standard and delimiter By default all functions are using the most popular Adobe version of ascii85 and -not adding any delimeter. However, there are three more standards supported - -btoa (different delimeter and additional compression of 4 bytes equal to 32), +not adding any delimiter. However, there are three more standards supported - +btoa (different delimiter and additional compression of 4 bytes equal to 32), [Z85](https://rfc.zeromq.org/spec/32/) and [RFC 1924](https://tools.ietf.org/html/rfc1924). It's possible to use a different encoding by specifying it in `options` object as a second parameter. -Similarly, it's possible to make `encode` add a delimeter (`<~` and `~>` for -Adobe, `xbtoa Begin` and `xbtoa End` with newlines between the delimeters and -encoded data for btoa. Checksums for btoa are not supported. Delimeters are not +Similarly, it's possible to make `encode` add a delimiter (`<~` and `~>` for +Adobe, `xbtoa Begin` and `xbtoa End` with newlines between the delimiters and +encoded data for btoa. Checksums for btoa are not supported. Delimiters are not supported by other encodings.) encoding examples: @@ -562,9 +562,9 @@ import { const binaryData = new Uint8Array([136, 180, 79, 24]); console.log(encode(binaryData)); // => LpTqp -console.log(encode(binaryData, { standard: "Adobe", delimeter: true })); +console.log(encode(binaryData, { standard: "Adobe", delimiter: true })); // => <~LpTqp~> -console.log(encode(binaryData, { standard: "btoa", delimeter: true })); +console.log(encode(binaryData, { standard: "btoa", delimiter: true })); /* => xbtoa Begin LpTqp xbtoa End */ diff --git a/std/encoding/_yaml/example/inout.ts b/std/encoding/_yaml/example/inout.ts index b0b47e3fe8..2f7ca6d6b4 100644 --- a/std/encoding/_yaml/example/inout.ts +++ b/std/encoding/_yaml/example/inout.ts @@ -23,5 +23,5 @@ const string = stringify(test); if (Deno.inspect(test) === Deno.inspect(parse(string))) { console.log("In-Out as expected."); } else { - console.log("Someting went wrong."); + console.log("Something went wrong."); } diff --git a/std/encoding/_yaml/loader/loader.ts b/std/encoding/_yaml/loader/loader.ts index 16da3ba4ab..b4657c7457 100644 --- a/std/encoding/_yaml/loader/loader.ts +++ b/std/encoding/_yaml/loader/loader.ts @@ -942,7 +942,7 @@ function readBlockScalar(state: LoaderState, nodeIndent: number): boolean { } } - // Break this `while` cycle and go to the funciton's epilogue. + // Break this `while` cycle and go to the function's epilogue. break; } diff --git a/std/encoding/_yaml/type/float.ts b/std/encoding/_yaml/type/float.ts index 93635ba251..832934fe23 100644 --- a/std/encoding/_yaml/type/float.ts +++ b/std/encoding/_yaml/type/float.ts @@ -103,7 +103,7 @@ function representYamlFloat(object: Any, style?: StyleVariant): Any { const res = object.toString(10); // JS stringifier can build scientific format without dots: 5e-100, - // while YAML requres dot: 5.e-100. Fix it with simple hack + // while YAML requires dot: 5.e-100. Fix it with simple hack return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res; } diff --git a/std/encoding/ascii85.ts b/std/encoding/ascii85.ts index 6a303ebda0..cb2a3ec766 100644 --- a/std/encoding/ascii85.ts +++ b/std/encoding/ascii85.ts @@ -4,8 +4,8 @@ export type Ascii85Standard = "Adobe" | "btoa" | "RFC 1924" | "Z85"; /** * encoding/decoding options - * @property standard - characterset and delimeter (if supported and used). Defaults to Adobe - * @property delimeter - whether to use a delimeter (if supported) - "<~" and "~>" by default + * @property standard - characterset and delimiter (if supported and used). Defaults to Adobe + * @property delimiter - whether to use a delimiter (if supported) - "<~" and "~>" by default */ export interface Ascii85Options { standard?: Ascii85Standard; @@ -20,7 +20,7 @@ const Z85 = * @param uint8 input to encode * @param [options] encoding options * @param [options.standard=Adobe] encoding standard (Adobe, btoa, RFC 1924 or Z85) - * @param [options.delimeter] whether to use a delimeter, if supported by encoding standard + * @param [options.delimiter] whether to use a delimiter, if supported by encoding standard */ export function encode(uint8: Uint8Array, options?: Ascii85Options): string { const standard = options?.standard ?? "Adobe"; diff --git a/std/encoding/ascii85_test.ts b/std/encoding/ascii85_test.ts index cea939faf1..b6d77a8ffb 100644 --- a/std/encoding/ascii85_test.ts +++ b/std/encoding/ascii85_test.ts @@ -3,7 +3,7 @@ import { assertEquals } from "../testing/asserts.ts"; import { Ascii85Standard, decode, encode } from "./ascii85.ts"; type TestCases = Partial<{ [index in Ascii85Standard]: string[][] }>; const utf8encoder = new TextEncoder(); -const testCasesNoDelimeter: TestCases = { +const testCasesNoDelimiter: TestCases = { Adobe: [ ["test", "FCfN8"], ["ascii85", "@<5pmBfIs"], @@ -76,7 +76,7 @@ const testCasesNoDelimeter: TestCases = { [" ", "arR^H"], ], }; -const testCasesDelimeter: TestCases = { +const testCasesDelimiter: TestCases = { Adobe: [ ["test", "<~FCfN8~>"], ["ascii85", "<~@<5pmBfIs~>"], @@ -116,7 +116,7 @@ const testCasesDelimeter: TestCases = { ], }; -for (const [standard, tests] of Object.entries(testCasesNoDelimeter)) { +for (const [standard, tests] of Object.entries(testCasesNoDelimiter)) { if (tests === undefined) continue; Deno.test({ name: `[encoding/ascii85] encode ${standard}`, @@ -144,10 +144,10 @@ for (const [standard, tests] of Object.entries(testCasesNoDelimeter)) { }, }); } -for (const [standard, tests] of Object.entries(testCasesDelimeter)) { +for (const [standard, tests] of Object.entries(testCasesDelimiter)) { if (tests === undefined) continue; Deno.test({ - name: `[encoding/ascii85] encode ${standard} with delimeter`, + name: `[encoding/ascii85] encode ${standard} with delimiter`, fn(): void { for (const [bin, b85] of tests) { assertEquals( @@ -162,7 +162,7 @@ for (const [standard, tests] of Object.entries(testCasesDelimeter)) { }); Deno.test({ - name: `[encoding/ascii85] decode ${standard} with delimeter`, + name: `[encoding/ascii85] decode ${standard} with delimiter`, fn(): void { for (const [bin, b85] of tests) { assertEquals( diff --git a/std/encoding/binary.ts b/std/encoding/binary.ts index f4918e7500..f66fb61aae 100644 --- a/std/encoding/binary.ts +++ b/std/encoding/binary.ts @@ -193,7 +193,7 @@ export function putVarbig( return sizeof(o.dataType); } -/** Decodes a number from `r`, comsuming `sizeof(o.dataType)` bytes. If less than `sizeof(o.dataType)` bytes were read, throws `Deno.errors.unexpectedEof`. +/** Decodes a number from `r`, consuming `sizeof(o.dataType)` bytes. If less than `sizeof(o.dataType)` bytes were read, throws `Deno.errors.unexpectedEof`. * * `o.dataType` defaults to `"int32"`. */ export async function readVarnum( @@ -205,7 +205,7 @@ export async function readVarnum( return varnum(scratch, o) as number; } -/** Decodes a bigint from `r`, comsuming `sizeof(o.dataType)` bytes. If less than `sizeof(o.dataType)` bytes were read, throws `Deno.errors.unexpectedEof`. +/** Decodes a bigint from `r`, consuming `sizeof(o.dataType)` bytes. If less than `sizeof(o.dataType)` bytes were read, throws `Deno.errors.unexpectedEof`. * * `o.dataType` defaults to `"int64"`. */ export async function readVarbig( diff --git a/std/encoding/csv_stringify.ts b/std/encoding/csv_stringify.ts index 4c5f8c8165..c968820ddf 100644 --- a/std/encoding/csv_stringify.ts +++ b/std/encoding/csv_stringify.ts @@ -17,7 +17,7 @@ function getEscapedString(value: unknown, sep: string): string { if (typeof value === "object") str = JSON.stringify(value); else str = String(value); - // Is regex.test more performant here? If so, how to dynamically create? + // Is regex.test more performance here? If so, how to dynamically create? // https://stackoverflow.com/questions/3561493/ if (str.includes(sep) || str.includes(NEWLINE) || str.includes(QUOTE)) { return `${QUOTE}${str.replaceAll(QUOTE, `${QUOTE}${QUOTE}`)}${QUOTE}`; diff --git a/std/encoding/hex.ts b/std/encoding/hex.ts index 20d42f6579..4ff3f07246 100644 --- a/std/encoding/hex.ts +++ b/std/encoding/hex.ts @@ -5,7 +5,7 @@ // license that can be found in the LICENSE file. // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -const hextable = new TextEncoder().encode("0123456789abcdef"); +const hexTable = new TextEncoder().encode("0123456789abcdef"); /** * ErrInvalidByte takes an invalid byte and returns an Error. @@ -52,8 +52,8 @@ export function encode(src: Uint8Array): Uint8Array { const dst = new Uint8Array(encodedLen(src.length)); for (let i = 0; i < dst.length; i++) { const v = src[i]; - dst[i * 2] = hextable[v >> 4]; - dst[i * 2 + 1] = hextable[v & 0x0f]; + dst[i * 2] = hexTable[v >> 4]; + dst[i * 2 + 1] = hexTable[v & 0x0f]; } return dst; } diff --git a/std/encoding/toml.ts b/std/encoding/toml.ts index a397a7bd91..34a428b90e 100644 --- a/std/encoding/toml.ts +++ b/std/encoding/toml.ts @@ -679,7 +679,7 @@ class Dumper { const min = dtPad(value.getUTCMinutes().toString()); const s = dtPad(value.getUTCSeconds().toString()); const ms = dtPad(value.getUTCMilliseconds().toString(), 3); - // formated date + // formatted date const fData = `${value.getUTCFullYear()}-${m}-${d}T${h}:${min}:${s}.${ms}`; return `${this._declaration(keys)}${fData}`; } diff --git a/std/node/_stream/readable.ts b/std/node/_stream/readable.ts index c8ed29953d..54e0d8ecdf 100644 --- a/std/node/_stream/readable.ts +++ b/std/node/_stream/readable.ts @@ -258,7 +258,7 @@ class Readable extends Stream { //TODO(Soremwar) //Part of doEnd condition - //In node, output/inout are a duplex Stream + //In node, output/input are a duplex Stream // && // dest !== stdout && // dest !== stderr