test: evaluate
This commit is contained in:
parent
81b6dede03
commit
9120affd7f
2 changed files with 27 additions and 6 deletions
|
|
@ -1,9 +1,12 @@
|
|||
import shapeshifter from './shapeshifter.mjs';
|
||||
import * as strudel from '@strudel/core';
|
||||
|
||||
const { isPattern } = strudel;
|
||||
|
||||
export const extend = (...args) => {
|
||||
// TODO: find a way to make args available to eval without adding it to global scope...
|
||||
// sadly, "with" does not work in strict mode
|
||||
Object.assign(window, ...args);
|
||||
Object.assign(globalThis, ...args);
|
||||
};
|
||||
|
||||
export const evaluate = async (code) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue