blob: 2ab56b11ab4fb551ddfdb5eb2807682921547a5d [file] [log] [blame]
var matchAll = require('../string/virtual/match-all');
var StringPrototype = String.prototype;
module.exports = function (it) {
var own = it.matchAll;
return typeof it === 'string' || it === StringPrototype
|| (it instanceof String && own === StringPrototype.matchAll) ? matchAll : own;
};