Reference·JavaScript · @sascom/commonjsJavaScript

FormatQuantityOptions

Interface in @sascom/commonjs.

API catalogue · @sascom/commonjs · Interface

TypeScript#
interface FormatQuantityOptions

Options of formatQuantity

Members#

Member Kind Description
decimals Property Default per unit, for example 1 for mm and 3 for m
kind Property Default "length"
trim Property Leave out trailing zeros; default true
unit Property A unit symbol, or "auto" (default): mm under 10 m and m above, m² and m³, degrees

decimals#

TypeScript#
decimals?: number

Default per unit, for example 1 for mm and 3 for m

kind#

TypeScript#
kind?: QuantityKind

Default "length"

trim#

TypeScript#
trim?: boolean

Leave out trailing zeros; default true

unit#

TypeScript#
unit?: string

A unit symbol, or "auto" (default): mm under 10 m and m above, m² and m³, degrees