massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / core-js / es / instance / match-all.js
index 2ab56b11ab4fb551ddfdb5eb2807682921547a5d..252856597151c75fe922e7e54ff7bb871f81cc2f 100644 (file)
@@ -1,9 +1,10 @@
-var matchAll = require('../string/virtual/match-all');
+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
-    || (it instanceof String && own === StringPrototype.matchAll) ? matchAll : own;
+  return typeof it == 'string' || it === StringPrototype
+    || (isPrototypeOf(StringPrototype, it) && own === StringPrototype.matchAll) ? method : own;
 };