# Utility Nodes

Nodes for calculations, date/time operations, and general-purpose utilities.

---

## Calculator

Performs mathematical operations on one or more numbers.

**Category:** Utility

### Input Ports

| Port | Type | Required | Description |
|------|------|----------|-------------|
| **values** | Array | Yes | Array of numbers to operate on |

### Configuration

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| **operation** | String | `add` | Operation: `add`, `subtract`, `multiply`, `divide`, `power`, `sqrt`, `average`, `min`, `max`, `median`, `mode` |
| **precision** | Number | 2 | Number of decimal places in the result |

### Output Ports

| Port | Type | Description |
|------|------|-------------|
| **result** | Number | The calculation result |
| **operation** | String | The operation performed |
| **values** | Array | The input values |

---

## DateTime

Date and time operations with timezone support.

**Category:** Utility

### Input Ports

| Port | Type | Description |
|------|------|-------------|
| **datetime** | String | A date/time string to process (optional — defaults to current time) |

### Configuration

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| **operation** | String | `current` | Operation: `current` (now), `timestamp` (to Unix), `iso` (to ISO 8601), `unix` (from Unix) |
| **format** | String | (auto) | Custom date format string |
| **timezone** | String | (system) | Target timezone |

### Output Ports

| Port | Type | Description |
|------|------|-------------|
| **datetime** | String | The formatted date/time string |
| **timestamp** | Number | Unix timestamp |
| **format** | String | The format used |
| **timezone** | String | The timezone used |
| **iso** | String | ISO 8601 representation |

---

## Range

Generates a numeric sequence. Useful as input for ForEach loops or for generating test data.

**Category:** Utility

### Configuration

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| **start** | Number | No | 1 | Starting number |
| **end** | Number | Yes | — | Ending number |
| **step** | Number | No | 1 | Increment between numbers |

### Output Ports

| Port | Type | Description |
|------|------|-------------|
| **items** | Array | The generated number sequence |
| **count** | Number | Number of items generated |

### Example

With `start: 1`, `end: 5`, `step: 1` → outputs `[1, 2, 3, 4, 5]`

---

## Repeat

Repeats a given value N times, producing an array.

**Category:** Utility

### Input Ports

| Port | Type | Description |
|------|------|-------------|
| **value** | Mixed | The value to repeat |

### Configuration

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| **count** | Number | Yes | Number of times to repeat |

### Output Ports

| Port | Type | Description |
|------|------|-------------|
| **items** | Array | Array containing the value repeated N times |
| **count** | Number | Number of repetitions |

---

## Note

A documentation node that does not execute. Use it to add comments and explanations directly on the canvas. Supports Markdown formatting.

**Category:** Utility | **Shape:** Compact

### Configuration

| Parameter | Type | Description |
|-----------|------|-------------|
| **content** | String | Markdown text content |
| **noteType** | String | Visual style: `info`, `warning`, `success`, `error`, `note` |

Note nodes have no functional input or output ports — they exist purely for documentation purposes.

---

## Idea

A placeholder node for planned or conceptual functionality. Appears as a customizable visual element on the canvas. Like Note, it does not execute any logic.

**Category:** Utility | **Shape:** Compact

### Configuration

| Parameter | Type | Description |
|-----------|------|-------------|
| **instanceTitle** | String | Display title |
| **instanceDescription** | String | Description text |
| **icon** | String | Material Design icon name |
| **color** | String | Node color |
