( expr: MathJsonExpression | null )
| 66 | } |
| 67 | |
| 68 | export function isExpressionObject( |
| 69 | expr: MathJsonExpression | null |
| 70 | ): expr is ExpressionObject { |
| 71 | return ( |
| 72 | expr !== null && |
| 73 | typeof expr === 'object' && |
| 74 | ('fn' in expr || 'num' in expr || 'sym' in expr || 'str' in expr) |
| 75 | ); |
| 76 | } |
| 77 | |
| 78 | /** |
| 79 | * Returns true if `expr` has at least one recognized metadata property |