Intl.supportedValuesOf
Returns an array containing the supported calendar, collation, currency, numbering systems, or unit values for the given key
Syntax
Intl.supportedValuesOf(key)Parameters
| Parameter | Type | Description |
|---|---|---|
| key | string | One of: calendar, collation, currency, numberingSystem, timeZone, unit |
Return Value
An array of strings representing supported values
Examples
const calendars = Intl.supportedValuesOf('calendar')
console.log(calendars) // ['buddhist', 'chinese', 'coptic', ...]const currencies = Intl.supportedValuesOf('currency')
console.log(currencies.includes('USD')) // true
console.log(currencies.length)const timeZones = Intl.supportedValuesOf('timeZone')
const usZones = timeZones.filter(tz => tz.startsWith('America/'))
console.log(usZones.slice(0, 5))Understanding Intl.supportedValuesOf
The Intl.supportedValuesOf method in JavaScript returns an array containing the supported calendar, collation, currency, numbering systems, or unit values for the given key. It belongs to the Intl object and is one of the most widely used methods for working with intl values in modern JavaScript and TypeScript applications.
The method signature is Intl.supportedValuesOf(key). It accepts 1 parameter: key. When called, it returns an array of strings representing supported values. Understanding when and how to use supportedValuesOf() helps you write more expressive, readable code.
Common use cases for Intl.supportedValuesOf include data transformation, input validation, API response processing, and building reusable utility functions. It works well alongside related methods like intl-numberformat, intl-datetimeformat, intl-displaynames, enabling you to chain operations together for complex data manipulation pipelines.
Supported in Chrome 99+, Firefox 93+, Safari 15.4+, Edge 99+.
Browser Compatibility
Supported in Chrome 99+, Firefox 93+, Safari 15.4+, Edge 99+.
Related Methods
Intl.NumberFormatCreates an Intl.NumberFormat object that enables language-sensitive number formatting
Intl.DateTimeFormatCreates an Intl.DateTimeFormat object that enables language-sensitive date and time formatting
Intl.DisplayNamesCreates an Intl.DisplayNames object that enables the consistent translation of language, region, and script display names
More Intl Methods
Other methods in the Intl object
Related Tools
More Intl Methods
Explore JavaScript Methods
Browse our complete reference of 410 JavaScript methods with syntax, examples, and explanations.