This commit is contained in:
lcj
2026-07-15 16:53:38 +08:00
parent 073dfa5c00
commit 5cab2be283
4008 changed files with 49859 additions and 1095 deletions
+11
View File
@@ -0,0 +1,11 @@
'use strict';
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;
};