adamkiss / kirby-fluent-toolkit
Fluent, Extendable version of Toolkit classes for Kirby
Package info
github.com/adamkiss/kirby-fluent-toolkit
Type:kirby-plugin
pkg:composer/adamkiss/kirby-fluent-toolkit
0.3.4
2023-09-16 12:29 UTC
Requires
- php: >=8.1.0
- getkirby/composer-installer: ^1.2
Requires (Dev)
- getkirby/cms: 3.9.6.1
- pestphp/pest: ^2.12
README
Fluent (chainable) and extendable version of Kirby Toolkit - strings, arrays and collections.
Example
// Outputs "Tom, Jack, Jerry" echo fluent('tom jack jerry') ->split(' ') ->map(fn($name) => fluent($name)->ucfirst()) ->join(', '); // It also supports short helper f() echo f('tom jack jerry') ->split(' ') ->map(fn($name) => f($name)->ucfirst()) ->join(', ');