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

Function isNumberExpression

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

Source from the content-addressed store, hash-verified

14export const MISSING: MathJsonExpression = ['Error', "'missing'"];
15
16export function isNumberExpression(
17 expr: MathJsonExpression | null
18): expr is number | string | MathJsonNumberObject {
19 if (typeof expr === 'number' || isNumberObject(expr)) return true;
20 if (typeof expr === 'string' && matchesNumber(expr)) return true;
21 return false;
22}
23
24export function isNumberObject(
25 expr: MathJsonExpression | null

Callers 6

wrapShortMethod · 0.90
seriesTermDegreeFunction · 0.90
serializeMultiplyFunction · 0.90
bigintValueFunction · 0.90
countLeavesFunction · 0.85

Calls 2

isNumberObjectFunction · 0.85
matchesNumberFunction · 0.85

Tested by

no test coverage detected