( expression: string, _settings: InternalPlotSettings, _prevValue: math.MathNode, _path: string, store: StoreType )
| 4 | import type { PlotInput, InternalPlot, InternalPlotSettings } from './plot-types' |
| 5 | |
| 6 | export const sanitize = ( |
| 7 | expression: string, |
| 8 | _settings: InternalPlotSettings, |
| 9 | _prevValue: math.MathNode, |
| 10 | _path: string, |
| 11 | store: StoreType |
| 12 | ) => { |
| 13 | if (expression === '') throw Error('Empty mathjs expression') |
| 14 | try { |
| 15 | return parseExpression(expression, store.get) |
| 16 | } catch (e) { |
| 17 | throw Error('Invalid mathjs expression string') |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | export const format = (value: InternalPlot) => { |
| 22 | return value.__parsed.toString() |
nothing calls this directly
no test coverage detected
searching dependent graphs…