%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/12173/task/12173/root/proc/self/root/home/bitrix/www/bitrix/js/main/polyfill/find/js/
Upload File :
Create Path :
Current File : //proc/12173/task/12173/root/proc/self/root/home/bitrix/www/bitrix/js/main/polyfill/find/js/find.js

/**
 * Array.prototype.find polyfill
 */
;(function() {
	'use strict';

	if (typeof Array.prototype.find !== 'function')
	{
		Array.prototype.find = function(predicate, thisArg)
		{
			if (this === null)
			{
				throw new TypeError('Cannot read property \'find\' of null');
			}

			if (typeof predicate !== 'function')
			{
				throw new TypeError(typeof predicate + ' is not a function');
			}

			var arrLength = this.length;

			for (var i = 0; i < arrLength; i++)
			{
				if (predicate.call(thisArg, this[i], i, this))
				{
					return this[i];
				}
			}
		};
	}
})();

Zerion Mini Shell 1.0