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

Function isOperatorDef

src/math-json/scripts/generate_OPERATORS.ts:55–64  ·  view source on GitHub ↗
(d: unknown)

Source from the content-addressed store, hash-verified

53function isObj(x: unknown): x is DefRecord {
54 return x !== null && typeof x === 'object' && !Array.isArray(x);
55}
56
57function isOperatorDef(d: unknown): boolean {
58 return (
59 isObj(d) &&
60 ('evaluate' in d ||
61 'signature' in d ||
62 'sgn' in d ||
63 'complexity' in d ||
64 'canonical' in d)
65 );
66}
67

Callers 1

buildPayloadFunction · 0.70

Calls 1

isObjFunction · 0.85

Tested by

no test coverage detected