mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
merge
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
// https://stackoverflow.com/a/68628927/14115342
|
||||
|
||||
const ArrayToObject = (array = [], getKey) => array.reduce((obj, cur) => {
|
||||
const key = getKey(cur);
|
||||
return (Object.assign(Object.assign({}, obj), { [key]: cur }));
|
||||
}, {});
|
||||
Reference in New Issue
Block a user