UNPKG

@logicflow/engine

Version:

a process engine for javascript

23 lines 709 B
import { __awaiter } from "tslib"; import { runInNodeContext } from './nodeVm'; const isInNodeJS = typeof global === 'object' && global.global === global; const globalScope = (() => { if (typeof self === 'object' && self.self === self) { return self; } if (isInNodeJS) { return global; } if (typeof globalThis === 'object') { return globalThis; } return { eval: () => undefined, }; })(); const getExpressionResult = (code, context) => __awaiter(void 0, void 0, void 0, function* () { const r = yield runInNodeContext(code, context); return r; }); export { isInNodeJS, globalScope, getExpressionResult }; //# sourceMappingURL=index.js.map