refactor code

This commit is contained in:
DavidVentura
2024-01-26 17:21:38 +01:00
parent f891ca1ff9
commit 2e1d761e28
7 changed files with 380 additions and 225 deletions
-6
View File
@@ -47,12 +47,6 @@ DataView.prototype.readString = function (len) {
return String.fromCharCode.apply(null, new Uint8Array(ba.buffer));
};
const Memory = {
alloc: (len: number) => new DataView(new ArrayBuffer(len + 1)),
copy: (outbuf: DataView, inbuf: DataView, len: number) =>
outbuf.writeByteArray(new Uint8Array(inbuf.readByteArray(len).buffer)),
};
declare global {
interface DataView {
add(offset: number): DataView;