Atomic counter management for human-readable IDs (TC-1, RUN-2, etc.).
Methods
(static) current(name) → {number}
Get the current value of a counter without incrementing.
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string |
Returns:
- Type
- number
(static) next(name) → {number}
Atomically increment a counter and return the new value.
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | — Counter name ("test", "run", "project", "activity"). |
Returns:
The new counter value.
- Type
- number
(static) set(name, value)
Set a counter to a specific value (used during migration).
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | |
value |
number |