intl-locales-supported1.1.2 • Public • Published
Utility to help you polyfill the Node.js runtime when the
Intl APIs are missing, or if the built-in
Intl is missing locale data that you need.
var areIntlLocalesSupported = ;var localesMyAppSupports =/* list locales here */;if globalIntl// Determine if the built-in `Intl` has the locale data we need.if !// `Intl` exists, but it doesn't have the data we need, so load the// polyfill and replace the constructors we need with the polyfill's.;IntlNumberFormat = IntlPolyfillNumberFormat;IntlDateTimeFormat = IntlPolyfillDateTimeFormat;else// No `Intl`, so use and load the polyfill.globalIntl = ;
For more details, see the FormatJS guide on polyfillying
Intl in Node.js.
This software is free to use under the Yahoo! Inc. BSD license. See the LICENSE file for license text and copyright information.