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