first
This commit is contained in:
20
node_modules/core-js/internals/array-method-has-species-support.js
generated
vendored
Normal file
20
node_modules/core-js/internals/array-method-has-species-support.js
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
'use strict';
|
||||
var fails = require('../internals/fails');
|
||||
var wellKnownSymbol = require('../internals/well-known-symbol');
|
||||
var V8_VERSION = require('../internals/engine-v8-version');
|
||||
|
||||
var SPECIES = wellKnownSymbol('species');
|
||||
|
||||
module.exports = function (METHOD_NAME) {
|
||||
// We can't use this feature detection in V8 since it causes
|
||||
// deoptimization and serious performance degradation
|
||||
// https://github.com/zloirock/core-js/issues/677
|
||||
return V8_VERSION >= 51 || !fails(function () {
|
||||
var array = [];
|
||||
var constructor = array.constructor = {};
|
||||
constructor[SPECIES] = function () {
|
||||
return { foo: 1 };
|
||||
};
|
||||
return array[METHOD_NAME](Boolean).foo !== 1;
|
||||
});
|
||||
};
|
Reference in New Issue
Block a user