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