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