sodiray / radash

Functional utility library - modern, simple, typed, powerful
https://radash-docs.vercel.app
MIT License
4.1k stars 160 forks source link

Map entries with filtering #367

Closed stefaanv closed 6 months ago

stefaanv commented 8 months ago

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

vercel[bot] commented 8 months ago

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