From a2f30a209c97db6e2d24abacc4931307a3fe160b Mon Sep 17 00:00:00 2001 From: Andrej Rypo Date: Wed, 21 Aug 2024 11:08:09 +0200 Subject: [PATCH] laravel arrays --- readme.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/readme.md b/readme.md index e8903a5..68bbb86 100644 --- a/readme.md +++ b/readme.md @@ -1036,19 +1036,19 @@ You might not need this library. - `mpetrovich/dash` provides a full range of transformation functions, uses _arrays_ internally - `lodash-php/lodash-php` imitates Lodash and provides a full range of utilities, uses _arrays_ internally - `nikic/iter` implements a range of iteration primitives using _generators_, authored by a PHP core team member -- `illuminate/collections` should cover the needs of most Laravel developers, check the inner implementation for details +- `illuminate/collections` should cover the needs of most Laravel developers, but uses _arrays_ internally - in many cases, a `foreach` will do the same job -This library (`dakujem/toru`) does not provide a full range of ready-made transformation functions, +Toru library (`dakujem/toru`) does not provide a full range of ready-made transformation functions, rather provides the most common ones and means to bring in and compose own transformations. It originally started as an alternative to `nikic/iter` for daily tasks, which to me has a somewhat cumbersome interface. The `Itera` static _class_ tries to fix that by using a single class import instead of multiple function imports and by reordering the parameters so that the input collection is consistently the first one. -Still, composing multiple operations into one transformation is cumbersome, so the `IteraFn` factory was implemented to fix that. -It worked well, but was still verbose for mundane tasks. -To allow concise fluent/chained calls (like with Lodash), the `Dash` class was designed. +Still, composing multiple operations into one transformation felt cumbersome, so the `IteraFn` factory was implemented to fix that. +It worked well, but was still kind of verbose for mundane tasks. +To allow concise fluent/chained calls (like with Lodash), the `Dash` class was then designed. With it, it's possible to compose transformations neatly.