Skip to content

Instantly share code, notes, and snippets.

@JakeDawkins
Created May 15, 2018 06:16
Show Gist options
  • Select an option

  • Save JakeDawkins/1799d60465a9c343855da5502ffeaf2f to your computer and use it in GitHub Desktop.

Select an option

Save JakeDawkins/1799d60465a9c343855da5502ffeaf2f to your computer and use it in GitHub Desktop.
export const generateUserModel = ({ user }) => ({
getAll: () => { /* fetching/transform logic for all users */ },
getById: (id) => { /* fetching/transform logic for a single user */ },
getByGroupId: (id) => { /* fetching/transform logic for a group of users */ },
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment