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