diff --git a/src/CONST.js b/src/CONST.js index a920b745f948..e074abae932c 100755 --- a/src/CONST.js +++ b/src/CONST.js @@ -1175,6 +1175,8 @@ const CONST = { 'Zambia', 'Zimbabwe', ], + + // Values for checking if polyfill is required on a platform POLYFILL_TEST: { STYLE: 'currency', CURRENCY: 'XAF', diff --git a/src/libs/polyfill/index.js b/src/libs/IntlPolyfill/index.js similarity index 84% rename from src/libs/polyfill/index.js rename to src/libs/IntlPolyfill/index.js index 7b68f6ff1c7f..4b6a964645d8 100644 --- a/src/libs/polyfill/index.js +++ b/src/libs/IntlPolyfill/index.js @@ -1,10 +1,10 @@ -import shouldPolyfill from './intl-polyfill'; +import shouldPolyfill from './shouldPolyfill'; /** * Polyfill the Intl API if the ICU version is old. * This ensures that the currency data is consistent across platforms and browsers. */ -export default function polyfill() { +export default function intlPolyfill() { if (!shouldPolyfill()) { return; } diff --git a/src/libs/polyfill/index.native.js b/src/libs/IntlPolyfill/index.native.js similarity index 92% rename from src/libs/polyfill/index.native.js rename to src/libs/IntlPolyfill/index.native.js index 13eba6636d01..8deafb2280a2 100644 --- a/src/libs/polyfill/index.native.js +++ b/src/libs/IntlPolyfill/index.native.js @@ -1,4 +1,4 @@ -import shouldPolyfill from './intl-polyfill'; +import shouldPolyfill from './shouldPolyfill'; /** * Polyfill the Intl API, always performed for native devices. diff --git a/src/libs/polyfill/intl-polyfill.js b/src/libs/IntlPolyfill/shouldPolyfill.js similarity index 100% rename from src/libs/polyfill/intl-polyfill.js rename to src/libs/IntlPolyfill/shouldPolyfill.js diff --git a/src/setup/index.js b/src/setup/index.js index 2335cbff783f..b2fea9a98ad8 100644 --- a/src/setup/index.js +++ b/src/setup/index.js @@ -5,7 +5,7 @@ import CONST from '../CONST'; import platformSetup from './platformSetup'; import * as Metrics from '../libs/Metrics'; import * as Device from '../libs/actions/Device'; -import polyfill from '../libs/polyfill'; +import intlPolyfill from '../libs/IntlPolyfill'; export default function () { /* @@ -49,7 +49,7 @@ export default function () { I18nManager.forceRTL(false); // Polyfill the Intl API if locale data is not as expected - polyfill(); + intlPolyfill(); // Perform any other platform-specific setup platformSetup();