( expr: MathJsonExpression | null | undefined )
| 449 | |
| 450 | /** `Nothing` or the empty sequence (`["Sequence"]`) */ |
| 451 | export function isEmptySequence( |
| 452 | expr: MathJsonExpression | null | undefined |
| 453 | ): expr is null | undefined { |
| 454 | if (expr === null || expr === undefined) return true; |
| 455 | if (expr === 'Nothing') return true; |
| 456 | return operator(expr) === 'Sequence' && nops(expr) === 0; |
| 457 | } |
| 458 | |
| 459 | export function missingIfEmpty( |
| 460 | expr: MathJsonExpression | null | undefined |
no test coverage detected