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

Function hasMetaData

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

Source from the content-addressed store, hash-verified

80 * with a non-undefined value.
81 */
82export function hasMetaData(
83 expr: MathJsonExpression | null
84): expr is ExpressionObject & Partial<MathJsonAttributes> {
85 return (
86 isExpressionObject(expr) &&
87 ((expr as MathJsonAttributes).latex !== undefined ||
88 (expr as MathJsonAttributes).wikidata !== undefined ||
89 (expr as MathJsonAttributes).sourceOffsets !== undefined)
90 );
91}
92
93/** If expr is a string literal, return it.
94 *

Callers 1

boxFunction · 0.90

Calls 1

isExpressionObjectFunction · 0.85

Tested by

no test coverage detected