fix everything

This commit is contained in:
David Ralph
2020-10-04 17:21:15 +01:00
parent 1cdb469d08
commit d2ce84cac4
5 changed files with 15 additions and 25 deletions

View File

@@ -1,17 +0,0 @@
/**
* Merges 2 objects into a huge one
* @template T The original object
* @template U The object that is returned
* @param {...T} items The objects to merge
* @returns {U} The merged object
*/
export const merge = (...items) => {
const obj = {};
for (let i = 0; i < items.length; i++) {
for (const k in items[i]) {
if (!obj.hasOwnProperty(k)) obj[k] = items[i][k];
}
}
return obj;
};