summaryrefslogtreecommitdiff
path: root/util.ts
diff options
context:
space:
mode:
Diffstat (limited to 'util.ts')
-rw-r--r--util.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/util.ts b/util.ts
index f6beba238..7ac7b155c 100644
--- a/util.ts
+++ b/util.ts
@@ -23,6 +23,10 @@ export function typedArrayToArrayBuffer(ta: TypedArray): ArrayBuffer {
return ab as ArrayBuffer;
}
+export function arrayToStr(ui8: Uint8Array): string {
+ return String.fromCharCode(...ui8);
+}
+
// A `Resolvable` is a Promise with the `reject` and `resolve` functions
// placed as methods on the promise object itself. It allows you to do:
//