code-point-at.js 390 B

12345678910
  1. var isPrototypeOf = require('../../internals/object-is-prototype-of');
  2. var method = require('../string/virtual/code-point-at');
  3. var StringPrototype = String.prototype;
  4. module.exports = function (it) {
  5. var own = it.codePointAt;
  6. return typeof it == 'string' || it === StringPrototype
  7. || (isPrototypeOf(StringPrototype, it) && own === StringPrototype.codePointAt) ? method : own;
  8. };