# eq

> **eq**(`key`, `value`): [`Predicate`](https://stage.docs.arkiv.network/typescript-sdk/api-reference/query/type-aliases/predicate/)

Defined in: [src/query/predicate.ts:55](https://github.com/Arkiv-Network/arkiv-sdk-js/blob/18cbef7aeaa31d3dee70f3cba35fcd04e001d31b/src/query/predicate.ts#L55)

Creates an equality predicate

## Parameters

### key

`string`

The key to compare

### value

The value to compare

`string` | `number`

## Returns

[`Predicate`](https://stage.docs.arkiv.network/typescript-sdk/api-reference/query/type-aliases/predicate/)

The equality predicate

## Example

```ts
const predicate = eq("name", "John")
// result = { type: "eq", key: "name", value: "John" }
```