added whole system from ola4doc

This commit is contained in:
Bachir Soussi Chiadmi
2017-12-14 17:06:06 +01:00
parent 9646c74be1
commit 0611418f7a
8725 changed files with 817688 additions and 2 deletions
+20
View File
@@ -0,0 +1,20 @@
'use strict';
var callable = require('../../../object/valid-callable')
, value = require('../../../object/valid-value')
, some = Array.prototype.some, apply = Function.prototype.apply;
module.exports = function (predicate/*, thisArg*/) {
var k, self;
self = Object(value(this));
callable(predicate);
return some.call(self, function (value, index) {
if (apply.call(predicate, this, arguments)) {
k = index;
return true;
}
return false;
}, arguments[1]) ? k : -1;
};