'use strict';

var define = require('define-properties');
var getPolyfill = require('./polyfill');

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

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

	return polyfill;
};
