# Modulo

### Overview

The **Modulo Filter Component** checks whether the remainder of a division operation between two numbers is zero. If the remainder is zero, the message is passed through the `modulo` port.

### Usage

This component is used to validate if a number is evenly divisible by another number, making it useful for workflows requiring modular arithmetic checks.

#### Properties

| Property     | Type     | Description                                                                   |
| ------------ | -------- | ----------------------------------------------------------------------------- |
| `sourceData` | `number` | The dividend (number to be divided).                                          |
| `value`      | `number` | The divisor. The component checks if `sourceData` is divisible by this value. |

#### Input Ports

| Port | Description                                                |
| ---- | ---------------------------------------------------------- |
| `in` | Accepts the dividend (`sourceData`) and divisor (`value`). |

#### Output Ports

| Port     | Description                                    |
| -------- | ---------------------------------------------- |
| `modulo` | Emits the remainder of the division operation. |

#### Processing Logic

1. **Receives Input Data**:
   * Accepts `sourceData` (dividend) and `value` (divisor).
2. **Performs Modulo Operation**:
   * Computes `sourceData % value` to find the remainder.
3. **Routes the Message**:
   * Outputs the remainder to the `modulo` port.

#### Output Data Schema

| Property     | Type     | Description                                |
| ------------ | -------- | ------------------------------------------ |
| `sourceData` | `number` | The dividend used in the modulo operation. |
| `value`      | `number` | The divisor used in the modulo operation.  |
| `result`     | `number` | The remainder of `sourceData % value`.     |

### Notes

* **Works with Numeric Inputs**: Only accepts numbers as input values.
* **Used for Modular Checks**: Determines whether a number is evenly divisible by another.
* **Ideal for Conditional Filtering**: Useful in workflows requiring periodic checks (e.g., every Nth event).

This component is essential for workflows that need to determine divisibility or process data based on modular arithmetic conditions.
