-
Notifications
You must be signed in to change notification settings - Fork 0
/
utils.js
37 lines (35 loc) · 891 Bytes
/
utils.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
module.exports = function() {
function mapsTo(name, arr){
switch(name) {
case 'Back Squat':
return arr.filter(function(exercise){
return exercise.name === 'Barbell Squat';
})
case 'Deadlift':
return arr.filter(function(exercise){
return exercise.name === 'Barbell Deadlift';
})
case 'Overhead Press':
return arr.filter(function(exercise){
return exercise.name === 'Standing Barbell Shoulder Press (OHP)';
})
case 'Bench Press':
return arr.filter(function(exercise){
return exercise.name === 'Barbell Bench Press';
})
case 'Pendlay Row':
return arr.filter(function(exercise){
return exercise.name === 'Bent Over Barbell Row';
})
case 'Pull-up':
return arr.filter(function(exercise){
return exercise.name === 'Pull-up';
})
default:
return []
}
}
return {
mapsTo: mapsTo
}
}()