Skip to content

Instantly share code, notes, and snippets.

@IPRIT
Created April 11, 2015 14:41
Show Gist options
  • Select an option

  • Save IPRIT/c4cf33c41a2c2f6aea97 to your computer and use it in GitHub Desktop.

Select an option

Save IPRIT/c4cf33c41a2c2f6aea97 to your computer and use it in GitHub Desktop.
function checkUsersValid(goodUsers) {
return function(submittedUsers) {
return submittedUsers.every(function(el) {
var cur_id = el.id;
return goodUsers.some(function(el) {
return el.id === cur_id;
});
});
};
}
module.exports = checkUsersValid;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment