UNPKG

574 BJavaScriptView Raw
1// Expose `IntlPolyfill` as global to add locale data into runtime later on.
2global.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.
6require('./locale-data/complete.js');
7
8// hack to export the polyfill as global Intl if needed
9if (!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
15module.exports = global.IntlPolyfill;