source: trip-planner-front/node_modules/core-js/features/instance/at.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 479 bytes
Line 
1var arrayAt = require('../array/virtual/at');
2var stringAt = require('../string/virtual/at');
3
4var ArrayPrototype = Array.prototype;
5var StringPrototype = String.prototype;
6
7module.exports = function (it) {
8 var own = it.at;
9 if (it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.at)) return arrayAt;
10 if (typeof it === 'string' || it === StringPrototype || (it instanceof String && own === StringPrototype.at)) {
11 return stringAt;
12 } return own;
13};
Note: See TracBrowser for help on using the repository browser.