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