aboutsummaryrefslogtreecommitdiff
path: root/node_modules/core-js/es/instance/code-point-at.js
blob: c4eaa422c983e0c3ca1b7b102e5cdafa83417d02 (plain)
1
2
3
4
5
6
7
8
9
var codePointAt = 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;
};