| ; | |
| module.exports = function (arr, predicate, ctx) { | |
| if (typeof Array.prototype.findIndex === 'function') { | |
| return arr.findIndex(predicate, ctx); | |
| } | |
| if (typeof predicate !== 'function') { | |
| throw new TypeError('predicate must be a function'); | |
| } | |
| var list = Object(arr); | |
| var len = list.length; | |
| if (len === 0) { | |
| return -1; | |
| } | |
| for (var i = 0; i < len; i++) { | |
| if (predicate.call(ctx, list[i], i, list)) { | |
| return i; | |
| } | |
| } | |
| return -1; | |
| }; | |
Xet Storage Details
- Size:
- 464 Bytes
- Xet hash:
- 1209f07c3c631af177c5271366ff811d99eb578af096d67737a6d384029518a5
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.