mirror of
https://github.com/actions/setup-python.git
synced 2025-07-19 08:08:20 +02:00
Fix.
This commit is contained in:
parent
7fe1ba03a3
commit
ec0a863019
7020 changed files with 1880198 additions and 489 deletions
25
node_modules/lodash/_createFind.js
generated
vendored
Normal file
25
node_modules/lodash/_createFind.js
generated
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
var baseIteratee = require('./_baseIteratee'),
|
||||
isArrayLike = require('./isArrayLike'),
|
||||
keys = require('./keys');
|
||||
|
||||
/**
|
||||
* Creates a `_.find` or `_.findLast` function.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} findIndexFunc The function to find the collection index.
|
||||
* @returns {Function} Returns the new find function.
|
||||
*/
|
||||
function createFind(findIndexFunc) {
|
||||
return function(collection, predicate, fromIndex) {
|
||||
var iterable = Object(collection);
|
||||
if (!isArrayLike(collection)) {
|
||||
var iteratee = baseIteratee(predicate, 3);
|
||||
collection = keys(collection);
|
||||
predicate = function(key) { return iteratee(iterable[key], key, iterable); };
|
||||
}
|
||||
var index = findIndexFunc(collection, predicate, fromIndex);
|
||||
return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = createFind;
|
Loading…
Add table
Add a link
Reference in a new issue