Files
NapCatQQ/.pnpm-store/v3/files/4f/2c407677685fce97b4561e669dfc4d169c4f8e9d6dcf34fe83bf364299464f89d91c179324654f97ec658acd70cd19a4696666225cc3d5501ac37d3bce1bfe
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

22 lines
588 B
Plaintext

import baseEach from './_baseEach.js';
/**
* The base implementation of `_.filter` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
*/
function baseFilter(collection, predicate) {
var result = [];
baseEach(collection, function(value, index, collection) {
if (predicate(value, index, collection)) {
result.push(value);
}
});
return result;
}
export default baseFilter;