|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
692 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 | var fails = require('../internals/fails');
|
|---|
| 3 | var wellKnownSymbol = require('../internals/well-known-symbol');
|
|---|
| 4 | var V8_VERSION = require('../internals/environment-v8-version');
|
|---|
| 5 |
|
|---|
| 6 | var SPECIES = wellKnownSymbol('species');
|
|---|
| 7 |
|
|---|
| 8 | module.exports = function (METHOD_NAME) {
|
|---|
| 9 | // We can't use this feature detection in V8 since it causes
|
|---|
| 10 | // deoptimization and serious performance degradation
|
|---|
| 11 | // https://github.com/zloirock/core-js/issues/677
|
|---|
| 12 | return V8_VERSION >= 51 || !fails(function () {
|
|---|
| 13 | var array = [];
|
|---|
| 14 | var constructor = array.constructor = {};
|
|---|
| 15 | constructor[SPECIES] = function () {
|
|---|
| 16 | return { foo: 1 };
|
|---|
| 17 | };
|
|---|
| 18 | return array[METHOD_NAME](Boolean).foo !== 1;
|
|---|
| 19 | });
|
|---|
| 20 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.