MCPcopy Create free account
hub / github.com/microsoft/SandDance / invertSearchExpressionGroup

Function invertSearchExpressionGroup

packages/search-expression/src/invert.ts:12–21  ·  view source on GitHub ↗
(input: SearchExpressionGroup)

Source from the content-addressed store, hash-verified

10} from './types';
11
12function invertSearchExpressionGroup(input: SearchExpressionGroup) {
13 //this only works if all expressions in this group have the same clause
14 const output: SearchExpressionGroup = {
15 expressions: input.expressions.map(invertSearchExpression),
16 };
17 if (input.clause) {
18 output.clause = invertedClauses[input.clause];
19 }
20 return output;
21}
22
23const invertedOperators: { [key in SearchExpressionOperators]: SearchExpressionOperators } = {
24 '!=': '==',

Callers 1

invertFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected