Create a new list formatter object that formats lists of items according to
the options.
The options object can contain zero or more of the following parameters:
- locale locale to use to format this list, or undefined to use the
default locale
- length - Specify the length of the format to use. The length is the approximate size of the
formatted string.
- style the name of style to use to format the list, or undefined
to use the default "conjunction" style. Valid values are:
- standard create a standard list.
- conjunction this list should be concatenated with a conjunction "and".
This is the default style for "standard".
- disjunction this list should be concatenated with a disjunction "or".
- unit this is a list of measures like "5 minutes, 4 seconds". In
some languages, these type of lists are concatenated without a conjunction.
- onLoad - a callback function to call when the locale data is fully loaded and the address has been
parsed. When the onLoad option is given, the address formatter object
will attempt to load any missing locale data using the ilib loader callback.
When the constructor is done (even if the data is already preassembled), the
onLoad function is called with the current instance as a parameter, so this
callback can be used with preassembled or dynamic loading or a mix of the two.
- sync - tell whether to load any missing locale data synchronously or
asynchronously. If this option is given as "false", then the "onLoad"
callback must be given, as the instance returned from this constructor will
not be usable for a while.
- loadParams - an object containing parameters to pass to the
loader callback function when locale data is missing. The parameters are not
interpretted or modified in any way. They are simply passed along. The object
may contain any property/value pairs as long as the calling code is in
agreement with the loader callback function as to what those parameters mean.