Convert simple array type to object map type.
E.g., ['a', 'b'] => {a: true, b: true}

@inner
@param {Array.<string|number>} arr the array that has unique element
@return {Object}
function arrToMap(arr) {
    return arr.reduce((prev, curr) => {
        prev[curr] = true;
        return prev;
    }, {});
}