SyntaxFix
Write A Post
Hire A Developer
Questions
const mapObject = (obj = {}, mapper) => Object.entries(obj).reduce( (acc, [key, val]) => ({ ...acc, [key]: mapper(val) }), {}, );