BUG
aijinhui
2024-03-26 0789e8546f8b5e68590e5ad7f4eb1d5c54e6cc22
1
2
3
4
5
6
7
8
9
10
var isPrototypeOf = require('../../internals/object-is-prototype-of');
var method = require('../string/virtual/repeat');
 
var StringPrototype = String.prototype;
 
module.exports = function (it) {
  var own = it.repeat;
  return typeof it == 'string' || it === StringPrototype
    || (isPrototypeOf(StringPrototype, it) && own === StringPrototype.repeat) ? method : own;
};