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