Last active
January 7, 2019 19:20
-
-
Save curtisj44/a07c31ece18e8f3f18cbcfa4cbee8199 to your computer and use it in GitHub Desktop.
JavaScript documentation format
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
// Exports | |
// ------- | |
// Verifies the current user has assignments | |
// | |
// Args: | |
// 1. `$$currentUser` - Immutable current_user object | |
// | |
// Example usage: | |
// `hasAssignments($$currentUser);` | |
// | |
// Returns: boolean | |
export default ($$currentUser) => { | |
const $$assignments = $$currentUser.size > 0 && $$currentUser.get('assignments'); | |
return $$assignments && $$assignments.get('data').size > 0; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment