list of byte encoded as JS Uint8Array + demo more readable

This commit is contained in:
Joeri Exelmans 2025-03-17 20:14:57 +01:00
parent 574651ccb7
commit 3d08485a08
6 changed files with 102 additions and 37 deletions

16
main.js
View file

@ -29,14 +29,20 @@ class Context {
const inType = getIn(fnType);
const outType = getOut(fnType);
console.log();
if (fn.name !== "") {
console.log("--".repeat(indent), fn, ':', fnType);
}
for (const i of this.instances.getdefault(inType)) {
const result = fn(i);
console.log("--".repeat(indent+1), i, '->', result);
if (this.types.getdefault(outType).includes(Function)) {
if (indent < 5) {
callFunctionOnEveryValue(result, outType, indent+2);
try {
const result = fn(i);
console.log("--".repeat(indent+1), i, '->', result);
if (this.types.getdefault(outType).includes(Function)) {
if (indent < 5) {
callFunctionOnEveryValue(result, outType, indent+2);
}
}
} catch (e) {
console.log("--".repeat(indent+1), i, `-> (exception: ${e})`);
}
}
}