Skip to content

Released: ArrayLookup 1.8.0

Compare
Choose a tag to compare
@samsonasik samsonasik released this 07 Sep 16:39
· 9 commits to main since this release
1.8.0
1f4027d

1.8.0

ci build Code Coverage PHPStan

Allow optional when on Collector class, just transform, no filter.

$data = [
    ' a ',
    ' b ',
    ' c ',
];

transformed trim new data with:

use ArrayLookup\Collector;

$transform = fn (string $datum): string => trim($datum);

$newArray = Collector::setUp($data)
       ->withTransform($transform)
       ->getResults(); // ['a', 'b', 'c']