Created
April 11, 2015 14:41
-
-
Save IPRIT/c4cf33c41a2c2f6aea97 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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