Sha256: bed9dfc86d47fa559aca2d00404335f9d259a442a289781b9c32e3e0acf5d2bf
Contents?: true
Size: 607 Bytes
Versions: 8
Compression:
Stored size: 607 Bytes
Contents
'use strict'; var isPrototypeOf = require('../../internals/object-is-prototype-of'); var arrayMethod = require('../array/virtual/at'); var stringMethod = require('../string/virtual/at'); var ArrayPrototype = Array.prototype; var StringPrototype = String.prototype; module.exports = function (it) { var own = it.at; if (it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.at)) return arrayMethod; if (typeof it == 'string' || it === StringPrototype || (isPrototypeOf(StringPrototype, it) && own === StringPrototype.at)) { return stringMethod; } return own; };
Version data entries
8 entries across 4 versions & 1 rubygems