serializeUnit

API / publicodes / serializeUnit

function serializeUnit(
   rawUnit, 
   count, 
   formatUnit): string | undefined

Experimental

Serialize a unit to a readable string

Parameters

ParameterTypeDefault value
rawUnitundefined | string | Unitundefined
countnumberplural
formatUnitformatUnit...

Returns

string | undefined

Defined in

packages/core/src/units.ts:100