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

Function isExpressionObject

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

Source from the content-addressed store, hash-verified

66}
67
68export 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

Callers 1

hasMetaDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected