ListFormat

open class ListFormat(locales: UnicodeBCP47LocaleIdentifier = definedExternally, options: ListFormatOptions = definedExternally)(source)

Constructors

Link copied to clipboard
constructor(locales: UnicodeBCP47LocaleIdentifier = definedExternally, options: ListFormatOptions = definedExternally)
constructor(locales: Locale, options: ListFormatOptions = definedExternally)
constructor(locales: ReadonlyArray<UnicodeBCP47LocaleIdentifier>, options: ListFormatOptions = definedExternally)
constructor(locales: ReadonlyArray<Locale>, options: ListFormatOptions = definedExternally)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun format(list: JsIterable<ERROR CLASS: Symbol not found for JsString>): String

Returns a string with a language-specific representation of the list.

Link copied to clipboard
fun formatToParts(list: JsIterable<ERROR CLASS: Symbol not found for JsString>): ReadonlyArray<ERROR CLASS: Symbol not found for JsAny>

Returns an Array of objects representing the different components that can be used to format a list of values in a locale-aware fashion.

Link copied to clipboard

Returns a new object with properties reflecting the locale and style formatting options computed during the construction of the current Intl.ListFormat object.