Skip to content

Instantly share code, notes, and snippets.

@curtisj44
Last active January 7, 2019 19:20
Show Gist options
  • Save curtisj44/a07c31ece18e8f3f18cbcfa4cbee8199 to your computer and use it in GitHub Desktop.
Save curtisj44/a07c31ece18e8f3f18cbcfa4cbee8199 to your computer and use it in GitHub Desktop.
JavaScript documentation format
// 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