# Function: matching()

```ts
function matching(
   node, 
   space, 
   ruleWhen, 
   me, 
   limit?
): Promise<readonly AutomationMatch[]>;
```

Defined in: [packages/core/src/schemas/automations.ts:372](https://github.com/leifriksheim/minca/blob/main/core/src/schemas/automations.ts#L372)

The records an automation holds for now, most recently changed first, for `me`,
who runs it. Includes that count are run as lists and counted here, so the
newest of them can tell when the automation came to hold.

## Parameters

| Parameter | Type | Default value |
| ------ | ------ | ------ |
| `node` | [`P2PNode`](https://minca.dev/api/core/interfaces/P2PNode.md) | `undefined` |
| `space` | `string` | `undefined` |
| `ruleWhen` | [`AutomationWhen`](https://minca.dev/api/schemas/interfaces/AutomationWhen.md) | `undefined` |
| `me` | `string` | `undefined` |
| `limit?` | `number` | `200` |

## Returns

`Promise`\<readonly [`AutomationMatch`](https://minca.dev/api/schemas/interfaces/AutomationMatch.md)[]\>
