Optional
binaryFormat the number using the Binary Prefix instead of the SI Prefix. This can be useful for presenting memory amounts. However, this should not be used for presenting file sizes.
Optional
bitsOptional
localefalse
: Output won't be localized.true
: Localize the output using the system/browser locale.string
: Expects a BCP 47 language tag (For example: en
, de
, …)string[]
: Expects a list of BCP 47 language tags (For example: en
, de
, …)Optional
maximumThe maximum number of fraction digits to display.
If neither minimumFractionDigits
or maximumFractionDigits
are set, the default behavior is to round to 3 significant digits.
Optional
minimumThe minimum number of fraction digits to display.
If neither minimumFractionDigits
or maximumFractionDigits
are set, the default behavior is to round to 3 significant digits.
Optional
signedInclude plus sign for positive numbers. If the difference is exactly zero a space character will be prepended instead for better alignment.
Optional
spacePut a space between the number and unit.
Options for the
formatBytes
function.