Skip to content

Instantly share code, notes, and snippets.

@PCreations
Last active January 10, 2019 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PCreations/715bbf02d481eada935066c9be22a5c6 to your computer and use it in GitHub Desktop.
Save PCreations/715bbf02d481eada935066c9be22a5c6 to your computer and use it in GitHub Desktop.
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