Skip to content

Latest commit

 

History

History
72 lines (48 loc) · 2.26 KB

README.md

File metadata and controls

72 lines (48 loc) · 2.26 KB

Collecterator: Generator based collections

Latest Version on Packagist Software License Build Status Total Downloads

This library is a fully featured \Generator based Collection implementation. The goal is to provide a memory efficient fast collection implementation that makes it possible to use familiar collection methods to work with infinite or very large streams.

Our tests were largely copied from tightenco/collect with many modifications added to support the deferred processing you get with Generators.

For basic usage, see the AllMethods.php example

Install

Via Composer

$ composer require buttress/collecterator

Usage

$collection = GeneratorCollection::make([1,2,3]);
$collection->filter(function(int $value) {
    return $value % 2;
});

$array = $collection->all();

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email korvinszanto@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.