MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / evaluate

Function evaluate

test/compute-engine/dictionary.test.ts:7–11  ·  view source on GitHub ↗
(expr: Expression)

Source from the content-addressed store, hash-verified

5import { dictionaryFromExpression } from '../../src/math-json/utils';
6
7function evaluate(expr: Expression) {
8 return exprToString(
9 engine.expr(expr)?.evaluate().toMathJson({ shorthands: [] })
10 );
11}
12
13function box(expr: Expression) {
14 return engine.expr(expr);

Callers 1

dictionary.test.tsFile · 0.70

Calls 4

exprToStringFunction · 0.90
toMathJsonMethod · 0.65
evaluateMethod · 0.65
exprMethod · 0.65

Tested by

no test coverage detected