You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
"use strict";
|
|
|
|
// Like Object.fromEntries, but for {key,value} instead of [key,value]
|
|
|
|
module.exports = function fromNamedEntries(namedEntries) {
|
|
return Object.fromEntries(namedEntries.map((entry) => {
|
|
let { key, value } = entry;
|
|
return [ key, value ];
|
|
}));
|
|
};
|