Skip to main content

Match

Stentor API Reference


Stentor API Reference / stentor-models/src / Match

Interface: Match

Defined in: packages/stentor-models/src/Match.ts:16

Match is an interface that describes how to compare two different values.

For example:

value of name is 1 operation is >= value 4

1 >= 4 is false

Properties​

name​

name: string

Defined in: packages/stentor-models/src/Match.ts:23

The name of the key on the object that the value is going to be compared against.

TODO: Could we call this key instead?


value​

value: string | number | boolean | (string | number | boolean)[]

Defined in: packages/stentor-models/src/Match.ts:27

The test value that is compared.


operation?​

optional operation: MatchOperation

Defined in: packages/stentor-models/src/Match.ts:33

The comparison operator.

If not provided, it defaults to "==="