I wanted to have a switch/case statement that accepts an object in Javascript.
The function looks like this.
const validate = (values) => { valu
Change
switch(values) {
To
switch(true) {
switch checks with strict equality.
And use, if necessary some break if you do not want to fall through the switch cases (kudos to blex).
break