MCPcopy Create free account
hub / github.com/dmno-dev/bumpy / matchCommand

Function matchCommand

packages/bumpy/test/helpers-shell-mock.ts:35–40  ·  view source on GitHub ↗
(cmdString: string, rule: MockRule)

Source from the content-addressed store, hash-verified

33let rules: MockRule[] = [];
34
35function matchCommand(cmdString: string, rule: MockRule): boolean {
36 if (typeof rule.match === 'string') {
37 return cmdString.includes(rule.match);
38 }
39 return rule.match.test(cmdString);
40}
41
42function findRule(cmdString: string): MockRule | undefined {
43 return rules.find((r) => matchCommand(cmdString, r));

Callers 1

findRuleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…