Kaizen
Browse modulesPricingpricing/sharedFunctions

Function: pricingUnitLabel()

function pricingUnitLabel(unit: string): string;

Defined in: shared/pricing/unit-labels.ts:92

Label a stored unit for display, tolerating a value the enum no longer accepts.

unit reaches the client as a plain string in some paths (a tier's default_unit is a varchar, since the enum's single source of truth is the Zod schema rather than a Prisma enum), so a direct SQL write can put an unknown value there. Returning the raw string beats rendering undefined.

Parameters

ParameterType
unitstring

Returns

string

On this page