source: trip-planner-front/node_modules/core-js/modules/esnext.array.last-index.js@ 571e0df

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

initial commit

  • Property mode set to 100644
File size: 697 bytes
Line 
1'use strict';
2var DESCRIPTORS = require('../internals/descriptors');
3var addToUnscopables = require('../internals/add-to-unscopables');
4var toObject = require('../internals/to-object');
5var toLength = require('../internals/to-length');
6var defineProperty = require('../internals/object-define-property').f;
7
8// `Array.prototype.lastIndex` getter
9// https://github.com/keithamus/proposal-array-last
10if (DESCRIPTORS && !('lastIndex' in [])) {
11 defineProperty(Array.prototype, 'lastIndex', {
12 configurable: true,
13 get: function lastIndex() {
14 var O = toObject(this);
15 var len = toLength(O.length);
16 return len == 0 ? 0 : len - 1;
17 }
18 });
19
20 addToUnscopables('lastIndex');
21}
Note: See TracBrowser for help on using the repository browser.