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