File size: 436 Bytes
5641073
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
'use strict';

var define = require('define-properties');
var shimUnscopables = require('es-shim-unscopables');

var getPolyfill = require('./polyfill');

module.exports = function shimFindIndex() {
	var polyfill = getPolyfill();

	define(
		Array.prototype,
		{ findIndex: polyfill },
		{
			findIndex: function () {
				return Array.prototype.findIndex !== polyfill;
			}
		}
	);

	shimUnscopables('findIndex');

	return polyfill;
};