number

Contains utility functions for dealing with numbers.

Methods:

add_commified_numbers
commify

Direct Link

add_commified_numbers

( numbers )
Adds together a list of numbers where items are allowed to be pre-commified.

Parameters

  • numbers Array
    An array of items to add; items may be either Numbers or commified Number strings.

Returns

String
The commified total of all numbers that were passed in.

Direct Link

commify

( number )
Takes a number and adds commas to the appropriate places, e.g. 1000000 to 1,000,000.

Parameters

  • number Number
    The value you want commified.

Returns

String
The commified number.