Skip to content

Commit b9f01a4

Browse files
committed
Fixing #8 as well as preventing future problems with SharedArrayBuffers
1 parent 64f579e commit b9f01a4

8 files changed

+13
-14
lines changed

EncoderDecoderTogether.min.js

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

individual/FastestTextDecoderPolyfill.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

individual/FastestTextDecoderPolyfill.min.js.map

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

individual/FastestTextDecoderPolyfill.src.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
return result;
3535
}
3636
function TextDecoder(){};
37-
TextDecoder.prototype.decode = function(inputArrayOrBuffer){
37+
TextDecoder["prototype"]["decode"] = function(inputArrayOrBuffer){
3838
var buffer = (inputArrayOrBuffer && inputArrayOrBuffer.buffer) || inputArrayOrBuffer;
3939
var asObjectString = Object_prototype_toString.call(buffer);
4040
if (asObjectString !== arrayBufferString && asObjectString !== sharedArrayBufferString)

individual/FastestTextEncoderPolyfill.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

individual/FastestTextEncoderPolyfill.min.js.map

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

individual/FastestTextEncoderPolyfill.src.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
);
3636
}
3737
function TextEncoder(){};
38-
TextEncoder.prototype.encode = function(inputString){
38+
TextEncoder["prototype"]["encode"] = function(inputString){
3939
// 0xc0 => 0b11000000; 0xff => 0b11111111; 0xc0-0xff => 0b11xxxxxx
4040
// 0x80 => 0b10000000; 0xbf => 0b10111111; 0x80-0xbf => 0b10xxxxxx
4141
var encodedString = inputString === void 0 ? "" : ("" + inputString).replace(/[\x80-\uD7ff\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g, encoderReplacer);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fastestsmallesttextencoderdecoder",
3-
"version": "1.0.13",
3+
"version": "1.0.14",
44
"description": "The fastest smallest Javascript polyfill for the encode of TextEncoder and decode of TextDecoder for UTF-8 only. Made by AnonyCo with ❤️ from 🐕s.",
55
"keywords": [
66
"utf-8",

0 commit comments

Comments
 (0)