Last active
April 11, 2020 18:56
-
-
Save jakerobers/26112544f984835e313260f5e9a8541f to your computer and use it in GitHub Desktop.
This file contains 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
import _ from 'lodash/fp'; | |
export const indexBooksByAuthor = _.keyBy('authorId'); | |
export const getSomeValue = () => { | |
// some code ... | |
const booksByAuthor = indexBooksByAuthor(books); | |
// some more code ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment