Open win0err opened 5 years ago
Thank you for the well done PR! Did you look into pick
and pluck
to compare what use cases aren’t supported?
Of course, I did!
pick
— almost same as prop_or
, but works only with arrays, but prop
, prop_or
, props
also works with objects (that's why it's called props
).
pluck
— can be represented with the following code: map($list, fn($item) => prop($key, $item))
P.S. If you have any questions — feel free to ask.
I'm happy to introduce the amazing set of functions:
path
,path_or
,prop
,prop_or
,props
.Example:
Result: