Plugin: Units
The Units plugin provides high-precision unit conversion utilities.
Plugin metadata
| Field | Value |
|---|---|
| ID | com.iflowkit.plugin.units |
| Name | iFlowKit Units Plugin |
| Version | 1.0.0 |
| Description | High-precision unit conversion utilities for common unit categories. |
Supported areas
The plugin is designed for categories such as:
- length
- mass
- volume
- area
- time
- speed
- pressure
- energy
- power
- temperature
- data
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
defaultScale | integer | 12 | Default scale when formatting or rounding is required. |
defaultRoundingMode | string | HALF_UP | Default Java RoundingMode value. |
strictUnitType | boolean | true | Prevents conversions across different unit types. |
enableAliases | boolean | true | Allows aliases such as mm, cm, °C, KB, KiB. |
Best practices
- Keep unit conversion logic out of individual CPI scripts.
- Prefer explicit unit codes in integration payloads.
- Keep
strictUnitTypeenabled unless a package has a deliberate reason to relax type checks. - Decide rounding behavior at package level rather than in many individual scripts.