.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / core-js / internals / array-method-has-species-support.js
1 var fails = require('../internals/fails');
2 var wellKnownSymbol = require('../internals/well-known-symbol');
3 var V8_VERSION = require('../internals/engine-v8-version');
4
5 var SPECIES = wellKnownSymbol('species');
6
7 module.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 };