( expr: MathJsonExpression | null | undefined )
| 148 | * or no arguments. |
| 149 | */ |
| 150 | export function operands( |
| 151 | expr: MathJsonExpression | null | undefined |
| 152 | ): ReadonlyArray<MathJsonExpression> { |
| 153 | if (Array.isArray(expr)) return expr.slice(1) as MathJsonExpression[]; |
| 154 | if (expr !== undefined && isFunctionObject(expr)) return expr.fn.slice(1); |
| 155 | |
| 156 | return []; |
| 157 | } |
| 158 | |
| 159 | /** Return the nth operand of a function expression */ |
| 160 | export function operand( |
no test coverage detected