quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

commit 02109cfb9015b59212490ac0e724ddc38f51001f
parent 3d44f4198322316716bd38aabc1268aa01ccb25c
Author: Charlie Gordon <github@chqrlie.org>
Date:   Sun, 25 Feb 2024 22:53:29 +0100

show readable representation of Date objects in repl

Diffstat:
Mquickjs/repl.js | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/quickjs/repl.js b/quickjs/repl.js @@ -1006,6 +1006,8 @@ import * as os from "os"; std.puts(a); } else if (stack.indexOf(a) >= 0) { std.puts("[circular]"); + } else if (a instanceof Date) { + std.puts("Date " + a.toGMTString().__quote()); } else if (has_jscalc && (a instanceof Fraction || a instanceof Complex || a instanceof Mod ||