Skip to main content

numeric

Module contains functions that operate on numbers

Methods

reverseAsString

pb.numeric.reverseAsString(number)

Reverses a number, leaving the result in string form

Returns: string - The reversed number as a string

ParamTypeDescription
numbernumberThe number to be reversed

formatAsString

pb.numeric.formatAsString(number)

Formats a number as a string for the forum's specified language

Returns: string - The formatted number as a string

ParamTypeDescription
numbernumberThe number to be formatted

commifyNumber

pb.numeric.commifyNumber(number)

Adds a list of commified numbers together and returns the sum

Returns: string - The input number as a commified string

ParamTypeDescription
numbernumberThe number to be commified

addCommifiedNumbers

pb.numeric.addCommifiedNumbers(numbersList)

Adds a list of commified numbers together and returns the sum

Returns: string - The sum of the commified numbers, as a commified string

ParamTypeDescription
numbersListArrayAn array of commified numbers (strings) to add