ran npm run tdd

This commit is contained in:
King
2018-01-15 10:58:44 -05:00
parent 6827cff03f
commit f762f76464
28 changed files with 247 additions and 0 deletions

9
test/merge/merge.js Normal file
View File

@ -0,0 +1,9 @@
module.exports = merge = (...objs) =>
[...objs].reduce(
(acc, obj) =>
Object.keys(obj).reduce((a, k) => {
acc[k] = acc.hasOwnProperty(k) ? [].concat(acc[k]).concat(obj[k]) : obj[k];
return acc;
}, {}),
{}
);