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