From ad3de86604f6bae352e06ef9154e371f4d5d1860 Mon Sep 17 00:00:00 2001 From: Axetroy Date: Mon, 27 May 2019 07:58:31 +0800 Subject: rename strings/strings.ts to strings/mod.ts (denoland/deno_std#449) Original: https://github.com/denoland/deno_std/commit/2f003fa35cb354b1b1cc43af196a0d356b334ed3 --- strings/decode.ts | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 strings/decode.ts (limited to 'strings/decode.ts') diff --git a/strings/decode.ts b/strings/decode.ts new file mode 100644 index 000000000..2e161d7af --- /dev/null +++ b/strings/decode.ts @@ -0,0 +1,7 @@ +/** A default TextDecoder instance */ +export const decoder = new TextDecoder(); + +/** Shorthand for new TextDecoder().decode() */ +export function decode(input?: Uint8Array): string { + return decoder.decode(input); +} -- cgit v1.2.3