Number Class
+ + + + +
+
+
+
+
+Number provides a set of utility functions to operate against Number objects.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+ + +
+
+
+
+
+
+
+
+
+
+ format
+
+
+
+ (
+
+
+
+
+ HTML
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
-
+
+
data+ +
+
+ -
+
+
config+ +
+
+
+
+
+
+ Takes a Number and formats to string for display to user.
+
+
+
+
+
+ Parameters:
+ +-
+
+
-
+
+
data+ Number + + + + +++ + +Number.
+
+
+ -
+
+
config+ Object + + + + +++ + +(Optional) Optional configuration values: +
-
+
- prefix {HTML} +
- String prepended before each number, like a currency designator "$" +
- decimalPlaces {Number} +
- Number of decimal places to round. Must be a number 0 to 20. +
- decimalSeparator {HTML} +
- Decimal separator +
- thousandsSeparator {HTML} +
- Thousands separator +
- suffix {HTML} +
- String appended after each number, like " items" (note the space) +
+
+
+
+
+
+
+Returns:
+ +
+
+
+ HTML:
+
+ Formatted number for display. Note, the following values
+return as "": null, undefined, NaN, "".
+
+
+ 