Class: CompiledFormat

numbr. CompiledFormat

new CompiledFormat(steps, opts, sortedPos)

A wrapper object for compiled formats.
Parameters:
Name Type Description
steps Array.<Step> An array of step functions to be called during CompiledFormat#run
opts object A options object that will be passed to every step function as part of the run state
sortedPos Array.<number> An array of output position indexes of each step in steps
Source:

Methods

run(num, roundFn, lang) → {string}

Runs all the transformation step functions using the given number and rounding function.
Parameters:
Name Type Description
num The number to format
roundFn function A rounding function
lang string The language code
Source:
Returns:
The formatted number
Type
string