Variable ListFormat
prototype: Intl.ListFormat;
supportedLocalesOf(locales: LocalesArgument, options?: Pick<ListFormatOptions, "localeMatcher">): string[];
new (locales?: LocalesArgument, options?: ListFormatOptions): Intl.ListFormat;
}
Type declaration
- new (locales?, options?): Intl.ListFormat
Parameters
Optional
locales: LocalesArgumentA string with a BCP 47 language tag, or an array of such strings. For the general form and interpretation of the
locales
argument, see theIntl
page.Optional
options: ListFormatOptionsAn object with some or all options of
ListFormatOptions
.
Returns Intl.ListFormat
Intl.ListFormatOptions object.
MDN.
prototype: Intl.ListFormat
supported
Locales :functionOf - supported
Locales (locales, options?): string[]Of Returns an array containing those of the provided locales that are supported in list formatting without having to fall back to the runtime's default locale.
Parameters
- locales: LocalesArgument
A string with a BCP 47 language tag, or an array of such strings. For the general form and interpretation of the
locales
argument, see theIntl
page. Optional
options: Pick<ListFormatOptions, "localeMatcher">An object. with some or all possible options.
Returns string[]
An array of strings representing a subset of the given locale tags that are supported in list formatting without having to fall back to the runtime's default locale.
MDN.
- locales: LocalesArgument
- supported
Creates Intl.ListFormat objects that enable language-sensitive list formatting.