newId
function newId(prefix): string;Defined in: src/id.ts:32
Generate a new entity id, e.g. newId("msg") → "msg_0uK9…" (22-char base62
suffix).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
prefix |
IdPrefix |
Returns
Section titled “Returns”string
Example
Section titled “Example”import { newId } from "@xtandard/webhooks";
const id = newId("ep"); // "ep_…"