mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 20:29:11 +00:00
Enable TS strict mode by default (#3899)
Fixes #3324 Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
This commit is contained in:
parent
852823fa50
commit
90125566bb
56 changed files with 314 additions and 179 deletions
|
@ -6,7 +6,7 @@ import { encode, decode } from "./base32.ts";
|
|||
|
||||
// Lifted from https://stackoverflow.com/questions/38987784
|
||||
const fromHexString = (hexString: string): Uint8Array =>
|
||||
new Uint8Array(hexString.match(/.{1,2}/g).map(byte => parseInt(byte, 16)));
|
||||
new Uint8Array(hexString.match(/.{1,2}/g)!.map(byte => parseInt(byte, 16)));
|
||||
const toHexString = (bytes: Uint8Array): string =>
|
||||
bytes.reduce((str, byte) => str + byte.toString(16).padStart(2, "0"), "");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue