A Specifier string
Create a new locale-based object which exposes format(...) and formatPrefix(...) methods for the specified locale definition. The specified locale definition will be set as the new default locale definition.
A Format locale definition to be used as default.
Create a new locale-based object which exposes format(...) and formatPrefix(...) methods for the specified locale.
A Format locale definition.
Returns a new format function for the given string specifier. The returned function takes a number as the only argument, and returns a string representing the formatted number. The returned function will convert values to the units of the appropriate SI prefix for the specified numeric reference value before formatting in fixed point notation.
Uses the current default locale.
The general form of a specifier is [​[fill]align][sign][symbol][0][width][,][.precision][type]. For reference, an explanation of the segments of the specifier string, refer to the FormatSpecifier interface properties.
A Specifier string
The reference value to determine the appropriate SI prefix.
Parses the specified specifier, returning an object with exposed fields that correspond to the format specification mini-language and a toString method that reconstructs the specifier.
The general form of a specifier is [​[fill]align][sign][symbol][0][width][,][.precision][type]. For reference, an explanation of the segments of the specifier string, refer to the FormatSpecifier interface properties.
A specifier string.
Returns a suggested decimal precision for fixed point notation given the specified numeric step value.
The step represents the minimum absolute difference between values that will be formatted. (This assumes that the values to be formatted are also multiples of step.)
Returns a suggested decimal precision for use with locale.formatPrefix given the specified numeric step and reference value.
The step represents the minimum absolute difference between values that will be formatted. (This assumes that the values to be formatted are also multiples of step.)
Reference value determines which SI prefix will be used.
Returns a suggested decimal precision for format types that round to significant digits given the specified numeric step and max values.
The step represents the minimum absolute difference between values that will be formatted. (This assumes that the values to be formatted are also multiples of step.)
max represents the largest absolute value that will be formatted.
Generated using TypeDoc
Returns a new format function for the given string specifier. The returned function takes a number as the only argument, and returns a string representing the formatted number.
Uses the current default locale.
The general form of a specifier is [​[fill]align][sign][symbol][0][width][,][.precision][type]. For reference, an explanation of the segments of the specifier string, refer to the FormatSpecifier interface properties.