Skip to content

Instantly share code, notes, and snippets.

@davidbarral
Last active June 18, 2022 15:57
Show Gist options
  • Save davidbarral/ec93a4bd4a6ab706c7c23814c48b0be6 to your computer and use it in GitHub Desktop.
Save davidbarral/ec93a4bd4a6ab706c7c23814c48b0be6 to your computer and use it in GitHub Desktop.
DI Purist 2
const userRepo = require("./repos/user.js");
const updateUserPreference = require("./use-cases/update-user-preference.js");
const user = userRepo();
updateUserPreference({ key: "someKey", value: "someValue", { user });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment