massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / core-js / es / instance / replace-all.js
index d920a6014658d81d6a9e1398c3005e17ce1f02a4..da897284c6cc76a2ac5a43a0c44cfb3aa7b753b6 100644 (file)
@@ -1,9 +1,10 @@
-var replaceAll = require('../string/virtual/replace-all');
+var isPrototypeOf = require('../../internals/object-is-prototype-of');
+var method = require('../string/virtual/replace-all');
 
 var StringPrototype = String.prototype;
 
 module.exports = function (it) {
   var own = it.replaceAll;
-  return typeof it === 'string' || it === StringPrototype
-    || (it instanceof String && own === StringPrototype.replaceAll) ? replaceAll : own;
+  return typeof it == 'string' || it === StringPrototype
+    || (isPrototypeOf(StringPrototype, it) && own === StringPrototype.replaceAll) ? method : own;
 };