Intl

Intl.supportedValuesOf

Returns an array containing the supported calendar, collation, currency, numbering systems, or unit values for the given key

Syntax

JavaScript
Intl.supportedValuesOf(key)

Parameters

ParameterTypeDescription
keystringOne of: calendar, collation, currency, numberingSystem, timeZone, unit

Return Value

An array of strings representing supported values

Examples

Basic Usage
const calendars = Intl.supportedValuesOf('calendar')
console.log(calendars) // ['buddhist', 'chinese', 'coptic', ...]
Practical Example
const currencies = Intl.supportedValuesOf('currency')
console.log(currencies.includes('USD')) // true
console.log(currencies.length)
Advanced Usage
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

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.