formatValues()function

formatValues(values: Iterable<unknown>, options?: FormatOptions, caller: AnyCaller = formatValues): Iterable<string>
ParamType
valuesIterable<unknown>
Iterable of unknown values to format. required
optionsFormatOptions
Formatting options passed through to formatValue() for each item.
    .localeIntl.Locale
Override the locale for formatting (defaults to detected locale). readonly
callerAnyCaller
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"]