Sorry, we don't support your browser.  Install a modern browser

More general-use collection methods#218

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.

3 years ago
1

@Lukas Bestle would be great to collect some ideas for methods besides reduce

3 years ago
3 years ago

Maybe not really all all of them, but as I wrote, Laravel and JS are good sources for inspiration.

3 years ago

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.

3 years ago

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!

3 years ago

flatten and flatMap where metioned on discord

3 years ago

Right now, I missed a $collection->join() method

3 years ago