It would be useful to have collection methods in Kirby that are common in other implementations like JS and the Laravel collection.
An example I need often would be reduce
.
@Lukas Bestle would be great to collect some ideas for methods besides reduce
https://laravel.com/docs/8.x/collections#available-methods
all of them? please. 😇
Maybe not really all all of them, but as I wrote, Laravel and JS are good sources for inspiration.
I am trying to make these ideas on Nolt a bit more actionable. Many of them are really broad at the moment and thus harder to start working on and thus just stay around.
JS and Laravel might be great inspirations and in some world maybe all of them would be great - but in an actual Kirby world, I think only a subset really makes sense to not totally bloat the classes with ervery possible method.
Which is why I was hoping to start narrowing down this idea to an actual set of methods, so it becomes actionable.
This idea has zero upvotes at the moment besides mine. So TBH I think we should only start making this actionable once we actually want to implement it. We have a lot to do at the moment. :)
but in an actual Kirby world, I think only a subset really makes sense to not totally bloat the classes with ervery possible method.
Fully agreed!
flatten and flatMap where metioned on discord
Right now, I missed a $collection->join()
method