( expr: MathJsonExpression | null )
| 53 | } |
| 54 | |
| 55 | export function isFunctionObject( |
| 56 | expr: MathJsonExpression | null |
| 57 | ): expr is MathJsonFunctionObject { |
| 58 | return ( |
| 59 | expr !== null && |
| 60 | typeof expr === 'object' && |
| 61 | 'fn' in expr && |
| 62 | Array.isArray(expr.fn) && |
| 63 | expr.fn.length > 0 && |
| 64 | typeof expr.fn[0] === 'string' |
| 65 | ); |
| 66 | } |
| 67 | |
| 68 | export function isExpressionObject( |
| 69 | expr: MathJsonExpression | null |