mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-06-23 04:59:26 +08:00
Add node modules and new code for release (#168)
Co-authored-by: OliverMKing <OliverMKing@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
ca8d2604ac
commit
a0f00e5017
+17
@@ -0,0 +1,17 @@
|
||||
var _cb = require('./_cb.js');
|
||||
var _getLength = require('./_getLength.js');
|
||||
|
||||
// Internal function to generate `_.findIndex` and `_.findLastIndex`.
|
||||
function createPredicateIndexFinder(dir) {
|
||||
return function(array, predicate, context) {
|
||||
predicate = _cb(predicate, context);
|
||||
var length = _getLength(array);
|
||||
var index = dir > 0 ? 0 : length - 1;
|
||||
for (; index >= 0 && index < length; index += dir) {
|
||||
if (predicate(array[index], index, array)) return index;
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = createPredicateIndexFinder;
|
||||
Reference in New Issue
Block a user