## Number

    Object
       |
       +--Number

SUMMARY: Constructor | Properties | Methods | DETAIL: Constructor | Properties | Methods

Methods Summary
`Object` | `format(fmt, locale)` format a Number to a String
`Object` | `toPercent(total, fmt, locale)` return the percentage of a Number according to a given total Number
`<static> Object` | `Sorter(field, order)` factory to create functions for sorting objects in an array

Method Detail

### format

    Object format(fmt, locale)

format a Number to a String

Parameters:

`String` - Format pattern

`java` - .util.Locale An optional Locale instance

Returns:

String Number formatted to a String

### toPercent

    Object toPercent(total, fmt, locale)

return the percentage of a Number according to a given total Number

Parameters:

`Int` - Total

`String` - Format Pattern

`java` - .util.Locale An optional Locale instance

Returns:

Int Percentage

### Sorter

    <static> Object Sorter(field, order)

factory to create functions for sorting objects in an array

Parameters:

`String` - name of the field each object is compared with

`Number` - order (ascending or descending)

Returns:

Function ready for use in Array.prototype.sort

SUMMARY: Constructor | Properties | Methods | DETAIL: Constructor | Properties | Methods

Documentation generated by JSDoc on Thu Apr 5 01:59:00 2007