@shumoku/core · 0.4.0 · function
newId
Generate a fresh unique ID for the given entity kind. Collision probability for 10-char nanoid is negligible for editor-scale workloads (~trillions of IDs before 1% collision chance).
newId(kind: IdKind, size?: number): string Parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
kind | IdKind | No additional description. | — |
size | number | No additional description. | 10 |
Returns
string