export const arrToObj = (a: T[]): { [key: string]: T } => a.reduce((acc, curr) => ({ ...acc, curr }), {});