summaryrefslogtreecommitdiff
path: root/std/encoding/hex.ts
diff options
context:
space:
mode:
authorAnh Hong <hong4rc@gmail.com>2020-12-11 02:45:45 +0700
committerGitHub <noreply@github.com>2020-12-11 06:45:45 +1100
commitb8bc24d167f2e19482d9dc6d367876c361abf4ea (patch)
tree5e46858514914eed698d1c941fe8593547e93ed4 /std/encoding/hex.ts
parentfd9b0202c1bb0e83183fd0a53d8b1303612a5e31 (diff)
chore: fixed various misspellings and other typos (#8691)
Diffstat (limited to 'std/encoding/hex.ts')
-rw-r--r--std/encoding/hex.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/std/encoding/hex.ts b/std/encoding/hex.ts
index 20d42f657..4ff3f0724 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;
}