1 | // Expose `IntlPolyfill` as global to add locale data into runtime later on.
|
2 | global.IntlPolyfill = require('./lib/core.js');
|
3 |
|
4 | // Require all locale data for `Intl`. This module will be
|
5 | // ignored when bundling for the browser with Browserify/Webpack.
|
6 | require('./locale-data/complete.js');
|
7 |
|
8 | // hack to export the polyfill as global Intl if needed
|
9 | if (!global.Intl) {
|
10 | global.Intl = global.IntlPolyfill;
|
11 | global.IntlPolyfill.__applyLocaleSensitivePrototypes();
|
12 | }
|
13 |
|
14 | // providing an idiomatic api for the nodejs version of this module
|
15 | module.exports = global.IntlPolyfill;
|