formatValues()function
formatValues(values: Iterable<unknown>, options?: FormatOptions, caller: AnyCaller = formatValues): Iterable<string>
| Param | Type | |
|---|---|---|
values | Iterable<unknown> | Iterable of unknown values to format. required |
options | FormatOptions | Formatting options passed through to formatValue() for each item. |
.locale | Intl.Locale | Override the locale for formatting (defaults to detected locale). readonly |
caller | AnyCaller | Function to attribute a thrown error to (defaults to formatValues itself). Defaults to formatValues |
| Return | |
|---|---|
Iterable<string> | Iterable yielding the user-facing string for each value. |
Format a sequence of values.
Examples
[...formatValues([1234, true])] // ["1,234", "Yes"]