packages/okam-core/src/extend/behavior/strategy.js
function arrToMap(arr) {
    return arr.reduce((prev, curr) => {
        prev[curr] = true;
        return prev;
    }, {});
}
function arrToMap(arr) {
    return arr.reduce((prev, curr) => {
        prev[curr] = true;
        return prev;
    }, {});
}
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}