mirror of
https://github.com/status-im/react-native.git
synced 2025-02-24 07:08:27 +00:00
Summary: Now that React Native ships with a newer version of JSC, we do not need this code to wrap `Object.freeze` any longer. Reviewed By: mmmulani Differential Revision: D14779239 fbshipit-source-id: 1a6e1a9c7f4312572bd08ba604fa8c9d6b1927e1
26 lines
741 B
JavaScript
26 lines
741 B
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow strict-local
|
|
* @format
|
|
*/
|
|
'use strict';
|
|
|
|
const {polyfillGlobal} = require('PolyfillFunctions');
|
|
|
|
/**
|
|
* Polyfill ES6 collections (Map and Set).
|
|
* If you don't need these polyfills, don't use InitializeCore; just directly
|
|
* require the modules you need from InitializeCore for setup.
|
|
*/
|
|
const _shouldPolyfillCollection = require('_shouldPolyfillES6Collection');
|
|
if (_shouldPolyfillCollection('Map')) {
|
|
polyfillGlobal('Map', () => require('Map'));
|
|
}
|
|
if (_shouldPolyfillCollection('Set')) {
|
|
polyfillGlobal('Set', () => require('Set'));
|
|
}
|