pure-effect 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +2 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -28,13 +28,13 @@ const validateRegistration = (input) => {
28
28
  const findUser = (email) => {
29
29
  const cmdFindUser = () => db.findUser(email); // The work to do later
30
30
  const next = (user) => Success(user); // Wrap result in Success
31
- return Command(cmd, next);
31
+ return Command(cmdFindUser, next);
32
32
  };
33
33
 
34
34
  const saveUser = (input) => {
35
35
  const cmdSaveUser = () => db.saveUser(input);
36
36
  const next = (saved) => Success(saved);
37
- return Command(cmd, next);
37
+ return Command(cmdSaveUser, next);
38
38
  };
39
39
 
40
40
  const ensureEmailAvailable = (user) => {
@@ -52,8 +52,6 @@ const registerUserFlow = (input) =>
52
52
 
53
53
  // The Imperative Shell
54
54
  async function registerUser() {
55
- const input = { email: 'new@test.com', password: 'password123' };
56
-
57
55
  // logic is just a data structure until we pass it to runEffect
58
56
  const logic = registerUserFlow(input);
59
57
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pure-effect",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "A tiny, zero-dependency effect system for writing pure, testable JavaScript without mocks.",
5
5
  "type": "module",
6
6
  "exports": "./index.js",