@shumoku/core · 0.4.0 · function
newId
APIの説明は英語のcanonical sourceを表示しています。
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 パラメーター
| 名前 | 型 | 説明 | 既定値 |
|---|---|---|---|
kind | IdKind | 追加説明はありません。 | — |
size | number | 追加説明はありません。 | 10 |
戻り値
string