1.1.0
1.1.0
Added ability to filter by key as well in all AtLeast
, Only
, and Finder
:
$data = ['abc def', 'def ghi', 'ghi jkl'];
$filter = static fn(string $datum, int $key): bool => str_contains($datum, 'def') && $key >= 0;
Atleast::once($data, $filter); // true
$filter = static fn(string $datum, int $key): bool => str_contains($datum, 'not found datum') && $key >= 0;
Atleast::once($data, $filter); // false