We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c72a0b commit f990f9aCopy full SHA for f990f9a
1 file changed
src/vs/base/common/uint.ts
@@ -5,6 +5,10 @@
5
6
export function toUint8ArrayBuffer(str: string): ArrayBuffer {
7
8
+ if (typeof TextEncoder !== undefined) {
9
+ return new TextEncoder().encode(str).buffer;
10
+ }
11
+
12
let i: number, len: number, length = 0, charCode = 0, trailCharCode = 0, codepoint = 0;
13
14
// First pass, for the size
0 commit comments