Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
16 lines
369 B
Plaintext
16 lines
369 B
Plaintext
/*
|
|
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
*/
|
|
|
|
"use strict";
|
|
|
|
/**
|
|
* Convert an object into an ES6 map
|
|
* @template {object} T
|
|
* @param {T} obj any object type that works with Object.entries()
|
|
* @returns {Map<string, T[keyof T]>} an ES6 Map of KV pairs
|
|
*/
|
|
module.exports = function objectToMap(obj) {
|
|
return new Map(Object.entries(obj));
|
|
};
|