createTimestampId
createTimestampId<
Brand>(brand,opts?):TimestampCodec<Brand>
Defined in: src/codecs/timestamp/index.ts:116
Creates a codec for brand (three lowercase a–z characters).
Type Parameters
Section titled “Type Parameters”Brand extends string
Parameters
Section titled “Parameters”Brand & ValidBrand<Brand>
Entity type brand validated once at construction.
TimestampOptions = {}
Optional now, rng, and allowDuplicateBrand overrides.
Returns
Section titled “Returns”TimestampCodec<Brand>
Example
Section titled “Example”const users = createTimestampId("usr");
const id = users.generate(); // Id<"usr">users.extractTimestamp(id); // Date