12 lines
304 B
JavaScript
12 lines
304 B
JavaScript
// Metro module 1518 (f1519).
|
|
export default function fromEntries(a0) {
|
|
return a0.reduce((acc, item) => {
|
|
const [r7, r23] = item;
|
|
if (acc.hasOwnProperty(r7)) {
|
|
throw new Error(`A value for key '${r7}' already exists in the object.`);
|
|
}
|
|
acc[r7] = r23;
|
|
return acc;
|
|
}, {});
|
|
};
|