NumberConverter source
Formats a number for easier readability.
Properties
-
allowFloat :Property source
-
Default Value: - {boolean} true
-
allowNegative :Property source
-
Default Value: - {boolean} true
-
allowPartialConversion :Property source
-
Allow partial conversion
Default Value: - {boolean} false
-
decimals :Property source
-
Default Value: - {number} 2
-
forceDecimals :Property source
-
Default Value: - {boolean} false
-
round :Property source
-
Default Value: - {number} null
-
shorten :Property source
-
Default Value: - {string} null
-
validator :Function source
-
Default Value: - {attribute} NumberValidator Uses this object.
Methods
-
convert(value) → {string} source
-
Parameters:
Name Type Description value
number The value to convert.
Returns: string
-
revert(stringValue) → {number} source
-
Parameters:
Name Type Description stringValue
string The string representation of a number.
See: Throws:
if the return value of NumberConverter#validator#validate is not a number- Type
- Error
Returns: number
The numeric value validated with to NumberConverter#validator.
Generated from v0.14.14