Shumoku Docs

ドキュメントを検索

共通文書と現行公開版

検索を読み込み中…

English

@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

libs/@shumoku/core/src/ids.ts:23