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

Function isEmptySequence

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

Source from the content-addressed store, hash-verified

449
450/** `Nothing` or the empty sequence (`["Sequence"]`) */
451export function isEmptySequence(
452 expr: MathJsonExpression | null | undefined
453): expr is null | undefined {
454 if (expr === null || expr === undefined) return true;
455 if (expr === 'Nothing') return true;
456 return operator(expr) === 'Sequence' && nops(expr) === 0;
457}
458
459export function missingIfEmpty(
460 expr: MathJsonExpression | null | undefined

Callers 15

parseEnclosureMethod · 0.90
parseSupsubMethod · 0.90
parsePrimaryMethod · 0.90
parseGeometryMarkFunction · 0.90
parseGeometryAccentFunction · 0.90
parseMathStyleSwitchFunction · 0.90
parseSizeSwitchFunction · 0.90
parseRootFunction · 0.90
parseFractionFunction · 0.90
parseBinomialFunction · 0.90

Calls 2

operatorFunction · 0.70
nopsFunction · 0.70

Tested by

no test coverage detected