merfix 0.1.61 → 0.1.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/merfix.d.ts +1 -0
- package/merfix.js +16 -17
- package/merfix_bg.wasm +0 -0
- package/package.json +1 -1
package/merfix.d.ts
CHANGED
package/merfix.js
CHANGED
|
@@ -9,16 +9,16 @@ function getUint8ArrayMemory0() {
|
|
|
9
9
|
return cachedUint8ArrayMemory0;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
let cachedTextDecoder =
|
|
12
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
cachedTextDecoder.decode();
|
|
15
15
|
|
|
16
16
|
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
17
17
|
let numBytesDecoded = 0;
|
|
18
18
|
function decodeText(ptr, len) {
|
|
19
19
|
numBytesDecoded += len;
|
|
20
20
|
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
21
|
-
cachedTextDecoder =
|
|
21
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
22
22
|
cachedTextDecoder.decode();
|
|
23
23
|
numBytesDecoded = len;
|
|
24
24
|
}
|
|
@@ -114,20 +114,18 @@ export function detect_image_extension(data) {
|
|
|
114
114
|
return v2;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
const cachedTextEncoder =
|
|
117
|
+
const cachedTextEncoder = new TextEncoder();
|
|
118
118
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
120
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
121
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
122
|
+
view.set(buf);
|
|
123
|
+
return {
|
|
124
|
+
read: arg.length,
|
|
125
|
+
written: buf.length
|
|
126
|
+
};
|
|
127
|
+
}
|
|
122
128
|
}
|
|
123
|
-
: function (arg, view) {
|
|
124
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
125
|
-
view.set(buf);
|
|
126
|
-
return {
|
|
127
|
-
read: arg.length,
|
|
128
|
-
written: buf.length
|
|
129
|
-
};
|
|
130
|
-
});
|
|
131
129
|
|
|
132
130
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
133
131
|
|
|
@@ -158,7 +156,7 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
158
156
|
}
|
|
159
157
|
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
160
158
|
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
161
|
-
const ret =
|
|
159
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
162
160
|
|
|
163
161
|
offset += ret.written;
|
|
164
162
|
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
@@ -277,6 +275,7 @@ export class ExifRemovalResult {
|
|
|
277
275
|
return v1;
|
|
278
276
|
}
|
|
279
277
|
}
|
|
278
|
+
if (Symbol.dispose) ExifRemovalResult.prototype[Symbol.dispose] = ExifRemovalResult.prototype.free;
|
|
280
279
|
|
|
281
280
|
const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
|
|
282
281
|
|
|
@@ -316,7 +315,7 @@ async function __wbg_load(module, imports) {
|
|
|
316
315
|
function __wbg_get_imports() {
|
|
317
316
|
const imports = {};
|
|
318
317
|
imports.wbg = {};
|
|
319
|
-
imports.wbg.
|
|
318
|
+
imports.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function(arg0, arg1) {
|
|
320
319
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
321
320
|
};
|
|
322
321
|
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
package/merfix_bg.wasm
CHANGED
|
Binary file
|