Function: generateHumanId()

generateHumanId(args: { capitalize?: boolean; lix: Pick<Lix, "sqlite" | "db" | "hooks">; separator?: string; }): string

Generates a human-readable ID that is deterministic in deterministic mode.

Example

const name = generateHumanId({ lix });
// In deterministic mode: returns deterministic names like "Plum", "Coin", etc.
// In normal mode: returns random human-id names

const lowercaseName = generateHumanId({ lix, capitalize: false });
// Returns lowercase names like "plum", "coin", etc.

Parameters

ParameterType
args{ capitalize?: boolean; lix: Pick<Lix, "sqlite" | "db" | "hooks">; separator?: string; }
args.capitalize?boolean
args.lixPick<Lix, "sqlite" | "db" | "hooks">
args.separator?string

Returns

string