Last active
January 10, 2019 14:24
-
-
Save PCreations/715bbf02d481eada935066c9be22a5c6 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
const { getFooOfId: createGetFooOfId } = require('../domain/foo/getFooOfId'); | |
const { saveFoo: createSaveFoo } = require('../domain/foo/saveFoo'); | |
const getFooOfId = inMemoryDatabase => createGetFooOfId(fooId => inMemoryDatabase[fooId]); | |
const saveFoo = inMemoryDatabase => createSaveFoo(fooState => inMemoryDatabase[fooState.id] = fooState); | |
module.exports = { | |
getFooOfId, | |
saveFoo, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment