match-all.js 300 B

123456789
  1. var matchAll = require('../string/virtual/match-all');
  2. var StringPrototype = String.prototype;
  3. module.exports = function (it) {
  4. var own = it.matchAll;
  5. return typeof it === 'string' || it === StringPrototype
  6. || (it instanceof String && own === StringPrototype.matchAll) ? matchAll : own;
  7. };