list of byte encoded as JS Uint8Array + demo more readable
This commit is contained in:
parent
574651ccb7
commit
3d08485a08
6 changed files with 102 additions and 37 deletions
16
main.js
16
main.js
|
|
@ -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})`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue