const mapToObject = function (data: Map<string, string>): object {
    if (!data) {
        return {}
    } else {
        return Object.assign({}, ...[...data.entries()].map(([k, v]) => ({[k]: v})))
    }
}

export {mapToObject}