You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
574 B
16 lines
574 B
// Expose `IntlPolyfill` as global to add locale data into runtime later on.
|
|
global.IntlPolyfill = require('./lib/core.js');
|
|
|
|
// Require all locale data for `Intl`. This module will be
|
|
// ignored when bundling for the browser with Browserify/Webpack.
|
|
require('./locale-data/complete.js');
|
|
|
|
// hack to export the polyfill as global Intl if needed
|
|
if (!global.Intl) {
|
|
global.Intl = global.IntlPolyfill;
|
|
global.IntlPolyfill.__applyLocaleSensitivePrototypes();
|
|
}
|
|
|
|
// providing an idiomatic api for the nodejs version of this module
|
|
module.exports = global.IntlPolyfill;
|