# Utility Nodes Miscellaneous helpers: counters, string diffs, list extraction from text, ISO date durations and the **Module Style** node that sets a module's canvas appearance. _5 nodes._ | Node | Registry path | | --- | --- | | [Counter](#counter) | `util/Counter` | | [Diff](#diff) | `util/Diff` | | [Extract List](#extract-list) | `util/ExtractList` | | [ISO Date Duration](#iso-date-duration) | `util/IsoDateDuration` | | [Module Style](#module-style) | `util/ModuleStyle` | ## Counter `util/Counter` Counter node that increments a numeric value inside a dict and returns the new value. **Inputs** | Input | Type | Description | | --- | --- | --- | | `state` | `any` | The graph state | | `dict` | `dict` | The dict containing the value to increment | | `key` | `str` | (optional) The key to the value to increment | | `reset` | `bool` | (optional) If true, the value will be reset to 0 | **Outputs** | Output | Type | Description | | --- | --- | --- | | `state` | `any` | The state input, passed through | | `value` | `any` | The new value | | `dict` | `dict` | The dict with the new value | **Properties** | Property | Type | Default | Description | | --- | --- | --- | --- | | `increment` | `number` | `1` | The amount to increment the value by. Min: 1. | | `key` | `str` | `"counter"` | The key to the value to increment | | `reset` | `bool` | `False` | If true, the value will be reset to 0 | ## Diff `util/Diff` Diff node that returns the diff between two strings. **Inputs** | Input | Type | Description | | --- | --- | --- | | `a` | `str` | The original string | | `b` | `str` | The changed string | **Outputs** | Output | Type | Description | | --- | --- | --- | | `diff_plain` | `str` | The diff as plain text | | `diff_html` | `str` | The diff as inline HTML markup | | `a` | `str` | The a input, passed through | | `b` | `str` | The b input, passed through | ## Extract List `util/ExtractList` Extracts a list from a string. Parses a numbered ("1.") or bulleted ("*" / "-") list out of text, such as an LLM response, returning the items as a list of strings. **Inputs** | Input | Type | Description | | --- | --- | --- | | `string` | `str` | The text to extract the list from | **Outputs** | Output | Type | Description | | --- | --- | --- | | `string` | `str` | The string input, passed through | | `list` | `list` | The extracted list items | | `is_empty` | `bool` | True if no list items were found | ## ISO Date Duration `util/IsoDateDuration` IsoDateDuration node that allows constructing ISO 8601 duration strings. Combines an amount and a unit into an ISO 8601 duration (e.g., 3 + "day" -> "P3D"). **Inputs** | Input | Type | Description | | --- | --- | --- | | `unit` | `str` | The unit of the duration (year, month, week, day, hour, minute, second) | | `amount` | `number` | The amount of the duration | **Outputs** | Output | Type | Description | | --- | --- | --- | | `unit` | `str` | The unit input, passed through | | `amount` | `number` | The amount input, passed through | | `duration` | `str` | The ISO 8601 duration string | **Properties** | Property | Type | Default | Description | | --- | --- | --- | --- | | `unit` | `str` | `"day"` | The unit of the duration. Choices: `year`, `month`, `week`, `day`, `hour`, `minute`, `second`. | | `amount` | `number` | `1` | The amount of the duration. Min: 1. | ## Module Style `util/ModuleStyle` An isolated node that defines the visual style of the graph it is placed in, when that graph is used as a node module inside another graph. **Properties** | Property | Type | Default | Description | | --- | --- | --- | --- | | `title_color` | `color` | `unset` | Title Color | | `node_color` | `color` | `unset` | Node Color | | `auto_title` | `str` | `unset` | Auto Title | | `icon` | `str` | `unset` | Icon (Material Icon Codepoint) |