- // 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;
|