Intl
getCanonicalLocalesExn
RES
let getCanonicalLocalesExn: string => array<string>getCanonicalLocalesExn(locale) returns the canonical form of locale.
Throws RangeError when the locale string is malformed.
See Intl.getCanonicalLocales on MDN.
Examples
RESIntl.getCanonicalLocalesExn("EN-US") == ["en-US"]
getCanonicalLocalesManyExn
RES
let getCanonicalLocalesManyExn: array<string> => array<string>getCanonicalLocalesManyExn(locales) canonicalises every locale in locales.
Throws RangeError when any locale string is malformed.
See Intl.getCanonicalLocales on MDN.
Examples
RESIntl.getCanonicalLocalesManyExn(["EN-US", "fr"]) == ["en-US", "fr"]
supportedValuesOfExn
RES
let supportedValuesOfExn: string => array<string>supportedValuesOfExn(key) returns the list of values supported by the runtime for the feature identified by key.
Throws RangeError when key is unsupported.
See Intl.supportedValuesOf on MDN.
Examples
RESIntl.supportedValuesOfExn("calendar")->Array.includes("gregory") == true