code-points.js 400 B

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