Skip to content
Docs
Reference

Function: minorUnits()

Function: minorUnits() in @ticketlayer/live.

@ticketlayer/live


@ticketlayer/live / index / minorUnits

function minorUnits(value: unknown): number | null;

Defined in: core/cartTotals.ts:67

Minor units, or null when the value is not minor units. Integers and all-digit strings only: a decimal like 12.5 or "12.50" is a major-unit amount or a rounding error waiting to happen, and either way it is not something this module will do arithmetic on.

Parameters#

ParameterType
valueunknown

Returns#

number | null