a single value, no?
const nameToColor = namedColors.reduce((acc,color) => { const unidecodedName = unidecode(color.name).toLowerCase(); return {...acc, [unidecodedName]: color} }, {}) it just looks a little more compact 🙂
Обсуждают сегодня