Travis build: 2114 [cron]

This commit is contained in:
30secondsofcode
2018-05-31 21:18:41 +00:00
parent 91d9546169
commit 19d7818ae6
5 changed files with 64 additions and 24 deletions

7
test/toHash/toHash.js Normal file
View File

@ -0,0 +1,7 @@
const toHash = (object, key) =>
Array.prototype.reduce.call(
object,
(acc, data, index) => ((acc[!key ? index : data[key]] = data), acc),
{}
);
module.exports = toHash;