jssm 5.72.0 → 5.72.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/CHANGELOG.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- 918 merges; 114 releases; Changlogging the last 10 commits; Full changelog at [CHANGELOG.long.md](CHANGELOG.long.md)
5
+ 919 merges; 114 releases; Changlogging the last 10 commits; Full changelog at [CHANGELOG.long.md](CHANGELOG.long.md)
6
6
 
7
7
 
8
8
 
@@ -18,6 +18,21 @@ Published tags:
18
18
 
19
19
 
20
20
 
21
+  
22
+
23
+  
24
+
25
+ ## [Untagged] - 6/24/2022 4:08:35 PM
26
+
27
+ Commit [a1c43e9f65f2fd8e856a2544f7c3056b4c06d9d3](https://github.com/StoneCypher/jssm/commit/a1c43e9f65f2fd8e856a2544f7c3056b4c06d9d3)
28
+
29
+ Author: `John Haugeland <stonecypher@gmail.com>`
30
+
31
+ * First steps towards being a Moore machine - initial data in constructor fixes StoneCypher/fsl#923 , can read in hooks fixes StoneCypher/fsl#924
32
+
33
+
34
+
35
+
21
36
  &nbsp;
22
37
 
23
38
  &nbsp;
@@ -160,21 +175,4 @@ Commit [de3d8a105aa85045a9f19ed46b4b3c5e5fb1e235](https://github.com/StoneCypher
160
175
 
161
176
  Author: `John Haugeland <stonecypher@gmail.com>`
162
177
 
163
- * another small commit as a trigger, this time to get the diff
164
-
165
-
166
-
167
-
168
- &nbsp;
169
-
170
- &nbsp;
171
-
172
- <a name="5__70__30" />
173
-
174
- ## [5.70.30] - 6/18/2022 10:54:02 AM
175
-
176
- Commit [3211f94bb943a63ae07f202eb168916d73f94f90](https://github.com/StoneCypher/jssm/commit/3211f94bb943a63ae07f202eb168916d73f94f90)
177
-
178
- Author: `John Haugeland <stonecypher@gmail.com>`
179
-
180
- * missing closing div tag was breaking examples page
178
+ * another small commit as a trigger, this time to get the diff
@@ -260,6 +260,21 @@ declare class Machine<mDT> {
260
260
  *
261
261
  */
262
262
  state(): StateType;
263
+ /*********
264
+ *
265
+ * Get the current data of a machine.
266
+ *
267
+ * ```typescript
268
+ * import * as jssm from 'jssm';
269
+ *
270
+ * const switch = jssm.from('on <=> off;', {data: 1});
271
+ * console.log( switch.data() ); // 1
272
+ * ```
273
+ *
274
+ * @typeparam mDT The type of the machine data member; usually omitted
275
+ *
276
+ */
277
+ data(): mDT;
263
278
  /********
264
279
  *
265
280
  * Check whether a given state is final (either has no exits or is marked
package/dist/es6/jssm.js CHANGED
@@ -719,6 +719,30 @@ class Machine {
719
719
  return true; // todo whargarbl
720
720
  }
721
721
  */
722
+ /*********
723
+ *
724
+ * Get the current data of a machine.
725
+ *
726
+ * ```typescript
727
+ * import * as jssm from 'jssm';
728
+ *
729
+ * const switch = jssm.from('on <=> off;', {data: 1});
730
+ * console.log( switch.data() ); // 1
731
+ * ```
732
+ *
733
+ * @typeparam mDT The type of the machine data member; usually omitted
734
+ *
735
+ */
736
+ data() {
737
+ return this._data;
738
+ }
739
+ /* whargarbl todo major
740
+ when we reimplement this, reintroduce this change to the is_final call
741
+
742
+ is_changing(): boolean {
743
+ return true; // todo whargarbl
744
+ }
745
+ */
722
746
  /********
723
747
  *
724
748
  * Check whether a given state is final (either has no exits or is marked
@@ -1,2 +1,2 @@
1
- const version = "5.72.0";
1
+ const version = "5.72.1";
2
2
  export { version };