summaryrefslogtreecommitdiff
path: root/std/encoding/hex.ts
diff options
context:
space:
mode:
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;
}