60828efc1e5533ae582afbb235570065cf9ad412dbd1ab7a52e662102263c7ab0c8e8db4b648f1528327184d76c5deeb4872a0a0a9497571e5dac26994857a 394 B

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