source: imaps-frontend/node_modules/core-js/modules/es.array.includes.js

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 794 bytes
Line 
1'use strict';
2var $ = require('../internals/export');
3var $includes = require('../internals/array-includes').includes;
4var fails = require('../internals/fails');
5var addToUnscopables = require('../internals/add-to-unscopables');
6
7// FF99+ bug
8var BROKEN_ON_SPARSE = fails(function () {
9 // eslint-disable-next-line es/no-array-prototype-includes -- detection
10 return !Array(1).includes();
11});
12
13// `Array.prototype.includes` method
14// https://tc39.es/ecma262/#sec-array.prototype.includes
15$({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
16 includes: function includes(el /* , fromIndex = 0 */) {
17 return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
18 }
19});
20
21// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
22addToUnscopables('includes');
Note: See TracBrowser for help on using the repository browser.