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