Skip to content

Instantly share code, notes, and snippets.

@bitfishxyz
Created May 3, 2020 12:05
Show Gist options
  • Save bitfishxyz/37f65f0d8ce33dfa4bff416acf5badbb to your computer and use it in GitHub Desktop.
Save bitfishxyz/37f65f0d8ce33dfa4bff416acf5badbb to your computer and use it in GitHub Desktop.
const jobList = ['FE', 'BE'];
var strategies = {
checkRole: function(value) {
if (value === 'registered') {
return true;
}
return false;
},
checkGrade: function(value) {
if (value >= 1) {
return true;
}
return false;
},
checkJob: function(value) {
if (jobList.indexOf(value) > 1) {
return true;
}
return false;
},
checkType: function(value) {
if (value === 'active user') {
return true;
}
return false;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment