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

Function match2

test/compute-engine/patterns.test.ts:871–872  ·  view source on GitHub ↗
(pattern, x)

Source from the content-addressed store, hash-verified

869// For example, "ax+b" can match "ax" or "x+b".
870describe('NON EXACT WILDCARDS', () => {
871 const match2 = (pattern, x) =>
872 match(pattern, x, { substitution: { _x: ce.expr('_x') } });
873
874 it('should match x for a + x', () => {
875 const result = match2(['Add', '_a', '_x'], '_x');

Callers 1

patterns.test.tsFile · 0.85

Calls 2

matchFunction · 0.70
exprMethod · 0.65

Tested by

no test coverage detected