intl-locales-supported
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.
Usage
var areIntlLocalesSupported = require('intl-locales-supported');
var localesMyAppSupports = [
];
if (global.Intl) {
if (!areIntlLocalesSupported(localesMyAppSupports)) {
require('intl');
Intl.NumberFormat = IntlPolyfill.NumberFormat;
Intl.DateTimeFormat = IntlPolyfill.DateTimeFormat;
}
} else {
global.Intl = require('intl');
}
For more details, see the FormatJS guide on polyfillying Intl
in Node.js.
License
This software is free to use under the Yahoo! Inc. BSD license.
See the LICENSE file for license text and copyright information.