Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map entries with filtering #367

Closed
wants to merge 2 commits into from
Closed

Map entries with filtering #367

wants to merge 2 commits into from

Conversation

stefaanv
Copy link

Description

Added filtering to object/mapEntries
Example

import { mapEntries } from 'radash'

const ra = {
  name: 'Ra',
  power: 'sun',
  rank: 100,
  culture: 'egypt'
}

mapEntries(ra, (key, value) => key === 'culture' ? undefined : [key.toUpperCase(), `${value}`]) 
// => { NAME: 'Ra', POWER: 'sun', RANK: '100' }

Resolves

Resolves #364

Copy link

vercel bot commented Nov 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
radash-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 30, 2023 7:58pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow filtering in MapEntries
1 participant