source: trip-planner-front/node_modules/core-js/configurator.js@ 6c1585f

Last change on this file since 6c1585f was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.0 KB
Line 
1var has = require('./internals/has');
2var isArray = require('./internals/is-array');
3var isForced = require('./internals/is-forced');
4var shared = require('./internals/shared-store');
5
6var data = isForced.data;
7var normalize = isForced.normalize;
8var USE_FUNCTION_CONSTRUCTOR = 'USE_FUNCTION_CONSTRUCTOR';
9var ASYNC_ITERATOR_PROTOTYPE = 'AsyncIteratorPrototype';
10
11var setAggressivenessLevel = function (object, constant) {
12 if (isArray(object)) for (var i = 0; i < object.length; i++) data[normalize(object[i])] = constant;
13};
14
15module.exports = function (options) {
16 if (typeof options == 'object') {
17 setAggressivenessLevel(options.useNative, isForced.NATIVE);
18 setAggressivenessLevel(options.usePolyfill, isForced.POLYFILL);
19 setAggressivenessLevel(options.useFeatureDetection, null);
20 if (has(options, USE_FUNCTION_CONSTRUCTOR)) shared[USE_FUNCTION_CONSTRUCTOR] = !!options[USE_FUNCTION_CONSTRUCTOR];
21 if (has(options, ASYNC_ITERATOR_PROTOTYPE)) shared[USE_FUNCTION_CONSTRUCTOR] = options[ASYNC_ITERATOR_PROTOTYPE];
22 }
23};
Note: See TracBrowser for help on using the repository browser.