Updated typo in example (#573)

Changed deocder to decoder
This commit is contained in:
rml1997
2022-07-11 13:26:45 +01:00
committed by GitHub
parent d6d8c0b80d
commit 1405158dfb

View File

@@ -1,11 +1,11 @@
const map = Bun.mmap("./mmap.txt", { shared: true });
const utf8deocder = new TextDecoder("utf-8");
const utf8decoder = new TextDecoder("utf-8");
let old = new TextEncoder().encode("12345");
setInterval(() => {
old = old.sort((a, b) => (Math.random() > 0.5 ? -1 : 1));
console.log(`changing mmap to ~> ${utf8deocder.decode(old)}`);
console.log(`changing mmap to ~> ${utf8decoder.decode(old)}`);
map.set(old);
}, 4);