@doeixd/machine 1.1.0 → 1.2.1

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.
package/README.md CHANGED
@@ -59,7 +59,9 @@ type Machine<C extends object> = {
59
59
  **Flexibility**: Unlike rigid FSM implementations, you can choose your level of immutability. Want to mutate? You can. Want pure functions? You can. Want compile-time state validation? Type-State Programming gives you that.
60
60
 
61
61
  **Read more about our core principles:** [ 📖 Core Principles Guide ](./docs/principles.md)
62
- **Explore our utility helpers:** [ 🏷️ Tagged Helpers & Utilities ](./docs/tagged-helpers.md)
62
+ **Learn about our recent refinements and workflows:** [ 🚀 Evolution & Workflows ](./docs/evolution.md)
63
+ **Prefer simplicity and little abstraction?** [ 🧘 The Minimalist's Manifesto (YAGNI) ](./docs/yagni.md)
64
+ **Explore our utility helpers (tag, isState, tag.factory, States):** [ 🏷️ Tagged Helpers & Utilities ](./docs/tagged-helpers.md)
63
65
 
64
66
  ## Choosing the Right Pattern
65
67
 
@@ -2192,6 +2192,15 @@ function tag(nameOrObj, props) {
2192
2192
  }
2193
2193
  return { tag: nameOrObj };
2194
2194
  }
2195
+ ((tag2) => {
2196
+ function factory2(name) {
2197
+ if (name) {
2198
+ return (props) => tag2(name, props);
2199
+ }
2200
+ return (name2) => (props) => tag2(name2, props);
2201
+ }
2202
+ tag2.factory = factory2;
2203
+ })(tag || (tag = {}));
2195
2204
  function isState2(machine2, tagValue) {
2196
2205
  return machine2.tag === tagValue;
2197
2206
  }