$.species-constructor.js 343 B

12345678
  1. // 7.3.20 SpeciesConstructor(O, defaultConstructor)
  2. var anObject = require('./$.an-object')
  3. , aFunction = require('./$.a-function')
  4. , SPECIES = require('./$.wks')('species');
  5. module.exports = function(O, D){
  6. var C = anObject(O).constructor, S;
  7. return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
  8. };