import { ListIterateeCustom } from '../_internal/ListIterateeCustom.js'; import { ObjectIterateeCustom } from '../_internal/ObjectIteratee.js'; /** * Checks if all elements in a collection pass the predicate check. * The predicate is invoked with three arguments: (value, index|key, collection). * * @template T - The type of elements in the collection * @param {ArrayLike | null | undefined} collection - The collection to iterate over * @param {ListIterateeCustom} [predicate=identity] - The function invoked per iteration * @returns {boolean} Returns true if all elements pass the predicate check, else false * * @example * // Using a function predicate * every([true, 1, null, 'yes'], Boolean) * // => false * * // Using property shorthand * const users = [{ user: 'barney', age: 36 }, { user: 'fred', age: 40 }] * every(users, 'age') * // => true * * // Using matches shorthand * every(users, { age: 36 }) * // => false * * // Using matchesProperty shorthand * every(users, ['age', 36]) * // => false */ declare function every(collection: ArrayLike | null | undefined, predicate?: ListIterateeCustom): boolean; /** * Checks if all elements in an object pass the predicate check. * The predicate is invoked with three arguments: (value, key, object). * * @template T - The type of the object * @param {T | null | undefined} collection - The object to iterate over * @param {ObjectIterateeCustom} [predicate=identity] - The function invoked per iteration * @returns {boolean} Returns true if all elements pass the predicate check, else false * * @example * // Using a function predicate * every({ a: true, b: 1, c: null }, Boolean) * // => false * * // Using property shorthand * const users = { * barney: { active: true, age: 36 }, * fred: { active: true, age: 40 } * } * every(users, 'active') * // => true * * // Using matches shorthand * every(users, { active: true }) * // => true * * // Using matchesProperty shorthand * every(users, ['age', 36]) * // => false */ declare function every(collection: T | null | undefined, predicate?: ObjectIterateeCustom): boolean; export { every };