Test migration to jest by hand
Apparently using regular expressions is way easier.
This commit is contained in:
5
test/mapObject/mapObject.js
Normal file
5
test/mapObject/mapObject.js
Normal file
@ -0,0 +1,5 @@
|
||||
const mapObject = (arr, fn) =>
|
||||
(a => (
|
||||
(a = [arr, arr.map(fn)]), a[0].reduce((acc, val, ind) => ((acc[val] = a[1][ind]), acc), {})
|
||||
))();
|
||||
module.exports = mapObject;
|
||||
Reference in New Issue
Block a user