MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / isFunctionObject

Function isFunctionObject

src/math-json/utils.ts:55–66  ·  view source on GitHub ↗
(
  expr: MathJsonExpression | null
)

Source from the content-addressed store, hash-verified

53}
54
55export 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
68export function isExpressionObject(
69 expr: MathJsonExpression | null

Callers 6

operatorFunction · 0.85
operandsFunction · 0.85
operandFunction · 0.85
nopsFunction · 0.85
mapArgsFunction · 0.85
jsValueToExpressionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected