const arrToObj = ([key, value]) => ({ [key]: value });JavaScript Factory Functions with ES6+7.1K31Eric ElliottTim ManFollowJul 24, 2017 · 1 min readwow, did not know about this