QUICKJS.SCRIPT

QUICKJS.SCRIPT LOAD script
QUICKJS.SCRIPT EXISTS sha1 [sha1 ...]
QUICKJS.SCRIPT FLUSH [ASYNC | SYNC]

Manage the QuickJS (JavaScript) script cache used by QUICKJS.EVAL and QUICKJS.EVALSHA. Behavior mirrors SCRIPT, on a cache that is independent of the PUC-Lua (SCRIPT), Luau (LUAU.SCRIPT), Wren (WREN.SCRIPT), Tcl (TCL.SCRIPT), and Python (UPYTHON.SCRIPT) caches.

Example

> QUICKJS.SCRIPT LOAD "return ARGV.reduce((a, b) => a + parseInt(b), 0)"
"a1b2c3..."

> QUICKJS.SCRIPT EXISTS a1b2c3...
1) (integer) 1

> QUICKJS.SCRIPT LOAD "return 1 +"
(error) ERR Error compiling script: unexpected token in expression: '}'

> QUICKJS.SCRIPT FLUSH
OK

See also