diff options
author | ULIVZ <472590061@qq.com> | 2018-06-01 16:52:30 +0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-06-04 08:56:57 +0200 |
commit | 0639f9b7cc845579c59f5a792dcacb76bb28a749 (patch) | |
tree | d424d3c394eb09a630bb664d544f05dd9bd5fd66 /util.ts | |
parent | a315d1ef97f36603cb343280c530d1cb5a0130c8 (diff) |
Avoid apply and move arrayToStr to util
Diffstat (limited to 'util.ts')
-rw-r--r-- | util.ts | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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: // |