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