(expr: MathJsonExpression | null | undefined)
| 169 | } |
| 170 | |
| 171 | export function nops(expr: MathJsonExpression | null | undefined): number { |
| 172 | if (expr === null || expr === undefined) return 0; |
| 173 | if (Array.isArray(expr)) return Math.max(0, expr.length - 1); |
| 174 | if (isFunctionObject(expr)) return Math.max(0, expr.fn.length - 1); |
| 175 | return 0; |
| 176 | } |
| 177 | |
| 178 | export function unhold( |
| 179 | expr: MathJsonExpression | null |
no test coverage detected