Open stefaanv opened 11 months ago
Pull request 367 created to resolv this issue
So this is kind of like combining select
with Object.entries
and Object.fromEntries
(and yours is obviously more performant).
Object.fromEntries(
select(
Object.entries(object),
([key]) => key !== 'power',
([key, value]) => [key.toUpperCase(), `${value}`],
),
)
Should it be a new function called selectEntries
?
~I'd be open to a PR in Radashi.~
edit: Over at Radashi, we came to the conclusion that this feature request doesn't meet the project standards. See here for more context.
If the
mapEntries()
code is updates as below, it's function would extend to filtering the properties of the objectThe example could become