Last change
on this file since 188ee53 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
509 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | var anObject = require('../internals/an-object');
|
---|
| 2 | var aFunction = require('../internals/a-function');
|
---|
| 3 | var wellKnownSymbol = require('../internals/well-known-symbol');
|
---|
| 4 |
|
---|
| 5 | var SPECIES = wellKnownSymbol('species');
|
---|
| 6 |
|
---|
| 7 | // `SpeciesConstructor` abstract operation
|
---|
| 8 | // https://tc39.es/ecma262/#sec-speciesconstructor
|
---|
| 9 | module.exports = function (O, defaultConstructor) {
|
---|
| 10 | var C = anObject(O).constructor;
|
---|
| 11 | var S;
|
---|
| 12 | return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);
|
---|
| 13 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.