repl2: working update + shuffle buttons + faster loading

This commit is contained in:
Felix Roos 2023-12-25 20:08:57 +01:00
parent d74d50c40a
commit 7dac1e275d
2 changed files with 85 additions and 48 deletions

View file

@ -62,6 +62,10 @@ export function repl({
};
setTime(() => scheduler.now()); // TODO: refactor?
const evaluate = async (code, autostart = true, shouldHush = true) => {
if (code === state.activeCode && state.started) {
logger('[eval] skip: not dirty')
return;
}
if (!code) {
throw new Error('no code to evaluate');
}