Skip to content

Commit 08ecafc

Browse files
committed
Simplify exports and fix variable declarations
Cleanup UMD bundle output: remove intermediate `var _default` and assign `._exports.default` directly in both loader and rtrace builds; move `TOTAL_OVERHEAD` assignment onto `_exports` (remove redundant `const`) in rtrace; fix indentation/initialization of the `off` variable in the loader string-decoding loop. Minor formatting and cleanup across the two UMD files.
1 parent c2ee55a commit 08ecafc

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/loader/umd/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
return utf16.decode(wtf16);
9393
} catch {
9494
let str = "",
95-
off = 0;
95+
off = 0;
9696
while (len - off > STRING_CHUNKSIZE) {
9797
str += String.fromCharCode(...wtf16.subarray(off, off += STRING_CHUNKSIZE));
9898
}
@@ -468,7 +468,7 @@
468468
}
469469
return extendedExports;
470470
}
471-
var _default = _exports.default = {
471+
_exports.default = {
472472
instantiate,
473473
instantiateSync,
474474
instantiateStreaming,

lib/rtrace/umd/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
const PTR_VIEW = Uint32Array;
3939
const BLOCK_OVERHEAD = _exports.BLOCK_OVERHEAD = PTR_SIZE;
4040
const OBJECT_OVERHEAD = _exports.OBJECT_OVERHEAD = 16;
41-
const TOTAL_OVERHEAD = _exports.TOTAL_OVERHEAD = BLOCK_OVERHEAD + OBJECT_OVERHEAD;
41+
_exports.TOTAL_OVERHEAD = BLOCK_OVERHEAD + OBJECT_OVERHEAD;
4242
function assert(x) {
4343
if (!x) throw Error("assertion failed");
4444
return x;
@@ -340,7 +340,7 @@
340340
}
341341
}
342342
_exports.Rtrace = Rtrace;
343-
var _default = _exports.default = {
343+
_exports.default = {
344344
Rtrace
345345
};
346346
});

0 commit comments

Comments
 (0)