source: trip-planner-front/node_modules/core-js/internals/array-method-has-species-support.js@ 8d391a1

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

initial commit

  • Property mode set to 100644
File size: 673 bytes
Line 
1var fails = require('../internals/fails');
2var wellKnownSymbol = require('../internals/well-known-symbol');
3var V8_VERSION = require('../internals/engine-v8-version');
4
5var SPECIES = wellKnownSymbol('species');
6
7module.exports = function (METHOD_NAME) {
8 // We can't use this feature detection in V8 since it causes
9 // deoptimization and serious performance degradation
10 // https://github.com/zloirock/core-js/issues/677
11 return V8_VERSION >= 51 || !fails(function () {
12 var array = [];
13 var constructor = array.constructor = {};
14 constructor[SPECIES] = function () {
15 return { foo: 1 };
16 };
17 return array[METHOD_NAME](Boolean).foo !== 1;
18 });
19};
Note: See TracBrowser for help on using the repository browser.