yz3456
2024-06-23 db3d71b62fcd859bf5e2c75b107c1d28bd977632
1
2
3
4
5
6
7
8
9
10
var isPrototypeOf = require('../../internals/object-is-prototype-of');
var method = require('../string/virtual/match-all');
 
var StringPrototype = String.prototype;
 
module.exports = function (it) {
  var own = it.matchAll;
  return typeof it == 'string' || it === StringPrototype
    || (isPrototypeOf(StringPrototype, it) && own === StringPrototype.matchAll) ? method : own;
};