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

Function compare

src/compute-engine/fungrim/loader.ts:246–253  ·  view source on GitHub ↗
(v: Expression, b: Expression)

Source from the content-addressed store, hash-verified

244 case 'cmp': {
245 const bound = boxGuardExpr(g.bound);
246 const compare = (v: Expression, b: Expression): boolean | undefined =>
247 g.op === 'gt'
248 ? v.isGreater(b)
249 : g.op === 'ge'
250 ? v.isGreaterEqual(b)
251 : g.op === 'lt'
252 ? v.isLess(b)
253 : v.isLessEqual(b);
254 return (sub) => {
255 const v = sub[g.wc];
256 if (v === undefined) return false;

Callers 1

buildGuardClosuresFunction · 0.70

Calls 4

isGreaterMethod · 0.65
isGreaterEqualMethod · 0.65
isLessMethod · 0.65
isLessEqualMethod · 0.65

Tested by

no test coverage detected