Intl.supportedValuesOf(key)returns an array of strings for one kind of Intl value. The key is a fixed name such as "calendar", "currency", "timeZone", "collation", "numberingSystem" or "unit".
List lengths can differ between engines, so tutorials should check known values with .includes() instead of printing the full length.
Remember
Intl.supportedValuesOf(key)
key → "calendar" | "collation" | "currency"
| "numberingSystem" | "timeZone" | "unit"
returns a string array
throws RangeError for an unknown key
Syntax
Pass one of the allowed key strings. Check a known value with includes.
Is array: true
Has gregory: true
Has japanese: true
The Try It page first checks that Intl.supportedValuesOf exists, because it is new in ES2022. In an older browser it prints a short explanation and the output above. In current browsers it runs the code for real.
How It Works
One key."calendar" asks for calendar identifiers only.
Stable checks.includes answers true or false without depending on list length.
Array result. The return value is always an array of strings when the key is valid.
Example 2 — Check That USD Is Supported
Currency codes are uppercase. Test for a well-known code such as USD.
JavaScript
const list = Intl.supportedValuesOf("currency");
console.log("USD in list: " + list.includes("USD"));
console.log("EUR in list: " + list.includes("EUR"));
console.log("Type: " + typeof list);
The Try It page first checks that Intl.supportedValuesOf exists, because it is new in ES2022. In an older browser it prints a short explanation and the output above. In current browsers it runs the code for real.
How It Works
Currency key. Pass "currency" to get ISO currency codes.
Known codes. USD and EUR are present on every modern engine.
typeof array. Arrays are objects in JavaScript, so typeof list is "object".
Example 3 — Check a Stable Time Zone Name
Time zone lists use IANA names. Check a common city zone instead of a short label like UTC.
Has America/New_York: true
Has Europe/Berlin: true
Is array: true
The Try It page first checks that Intl.supportedValuesOf exists, because it is new in ES2022. In an older browser it prints a short explanation and the output above. In current browsers it runs the code for real.
How It Works
IANA names. The list uses names like America/New_York, not every short alias.
Boolean output. Printing includes keeps the example deterministic.
Use with DateTimeFormat. Pass the same string as timeZone in date options.
Compatibility
Browser & Runtime Support
Intl.supportedValuesOf() is part of ES2022. Modern browsers and Node.js 18+ support it.
✓ ES2022 · Modern engines
Intl.supportedValuesOf()
Supported in Chrome 99+, Edge 99+, Firefox 93+, Safari 15.4+, Opera 85+ and Node.js 18+.
ES2022Standard since
Google Chrome99+ · Desktop & Mobile
Full support
Microsoft Edge99+ · Chromium based
Full support
Mozilla Firefox93+ · Desktop & Mobile
Full support
Apple Safari15.4+ · macOS & iOS
Full support
Opera85+ · Chromium based
Full support
Samsung InternetRecent versions · Android
Supported
Android WebView99+ · Chromium based
Supported
Node.js18+ · Server runtime
Supported
DenoSupported · JavaScript runtime
Supported
BunSupported · JavaScript runtime
Supported
Internet ExplorerNo native support
Not supported
Intl.supportedValuesOf()Good
Bottom line: Guard with typeof Intl.supportedValuesOf === "function" before calling it on older engines.
Frequently Asked Questions
The allowed keys are calendar, collation, currency, numberingSystem, timeZone and unit. Any other key throws a RangeError.
Engines can ship different data packs, so the number of time zones or currencies may differ. Checking includes("USD") stays stable.
Not as the short string "UTC". Use an IANA name such as America/New_York, or format with timeZone:"UTC" on DateTimeFormat without needing it in this list.
It is an ES2022 feature. Guard older engines with typeof Intl.supportedValuesOf === "function".
A sorted array of strings for that key. You can search it with includes or map it into a UI list.