jssm 5.77.0 → 5.77.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 +17 -17
- package/README.md +2 -2
- package/dist/es6/jssm.d.ts +21 -1
- package/dist/es6/jssm.js +23 -1
- package/dist/es6/version.js +1 -1
- package/dist/jssm.es5.cjs.js +1 -1
- package/dist/jssm.es5.iife.js +1 -1
- package/jssm.d.ts +21 -1
- package/package.json +1 -1
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
|
-
|
|
5
|
+
963 merges; 129 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] - 7/7/2022 10:11:44 PM
|
|
26
|
+
|
|
27
|
+
Commit [2c633a61b2ee0f13583ddc85923596f6b473abe6](https://github.com/StoneCypher/jssm/commit/2c633a61b2ee0f13583ddc85923596f6b473abe6)
|
|
28
|
+
|
|
29
|
+
Author: `John Haugeland <stonecypher@gmail.com>`
|
|
30
|
+
|
|
31
|
+
* Define go/1 to be a synonym for transition/1, fixes StoneCypher/fsl#810
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
21
36
|
|
|
22
37
|
|
|
23
38
|
|
|
@@ -160,19 +175,4 @@ Commit [86706ce989f8651b79f58dce6cf2511f43fa0629](https://github.com/StoneCypher
|
|
|
160
175
|
|
|
161
176
|
Author: `John Haugeland <stonecypher@gmail.com>`
|
|
162
177
|
|
|
163
|
-
* First draft of the KSD already caught a bug, removes equals from followup atom characters, fixes StoneCypher/fsl#993
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
## [Untagged] - 7/3/2022 2:16:27 PM
|
|
173
|
-
|
|
174
|
-
Commit [604f0dda3438d81a9209013d77caccc3b89cdd20](https://github.com/StoneCypher/jssm/commit/604f0dda3438d81a9209013d77caccc3b89cdd20)
|
|
175
|
-
|
|
176
|
-
Author: `John Haugeland <stonecypher@gmail.com>`
|
|
177
|
-
|
|
178
|
-
* Update typescript, typedoc, and the two typescript-eslint plugins
|
|
178
|
+
* First draft of the KSD already caught a bug, removes equals from followup atom characters, fixes StoneCypher/fsl#993
|
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ Please edit the file it's derived from, instead: `./src/md/readme_base.md`
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
* Generated for version 5.77.
|
|
21
|
+
* Generated for version 5.77.1 at 7/7/2022, 10:15:01 PM
|
|
22
22
|
|
|
23
23
|
-->
|
|
24
24
|
# jssm
|
|
@@ -29,7 +29,7 @@ share online. Easy to embed.
|
|
|
29
29
|
|
|
30
30
|
Readable, useful state machines as one-liner strings.
|
|
31
31
|
|
|
32
|
-
***4,
|
|
32
|
+
***4,666 tests*** run 5,557 times. 4,657 specs with 100.0% coverage, 9 fuzz tests with 5.4% coverage. With 1,728 lines, that's about 2.7 tests per line, or 3.2 generated tests per line.
|
|
33
33
|
|
|
34
34
|
***Meet your new state machine library.***
|
|
35
35
|
|
package/dist/es6/jssm.d.ts
CHANGED
|
@@ -665,7 +665,7 @@ declare class Machine<mDT> {
|
|
|
665
665
|
set history_length(to: number);
|
|
666
666
|
/********
|
|
667
667
|
*
|
|
668
|
-
* Instruct the machine to complete an action.
|
|
668
|
+
* Instruct the machine to complete an action. Synonym for {@link do}.
|
|
669
669
|
*
|
|
670
670
|
* ```typescript
|
|
671
671
|
* const light = sm`red 'next' -> green 'next' -> yellow 'next' -> red; [red yellow green] 'shutdown' ~> off 'start' -> red;`;
|
|
@@ -683,6 +683,26 @@ declare class Machine<mDT> {
|
|
|
683
683
|
*
|
|
684
684
|
*/
|
|
685
685
|
action(actionName: StateType, newData?: mDT): boolean;
|
|
686
|
+
/********
|
|
687
|
+
*
|
|
688
|
+
* Instruct the machine to complete an action. Synonym for {@link action}.
|
|
689
|
+
*
|
|
690
|
+
* ```typescript
|
|
691
|
+
* const light = sm`red 'next' -> green 'next' -> yellow 'next' -> red; [red yellow green] 'shutdown' ~> off 'start' -> red;`;
|
|
692
|
+
*
|
|
693
|
+
* light.state(); // 'red'
|
|
694
|
+
* light.do('next'); // true
|
|
695
|
+
* light.state(); // 'green'
|
|
696
|
+
* ```
|
|
697
|
+
*
|
|
698
|
+
* @typeparam mDT The type of the machine data member; usually omitted
|
|
699
|
+
*
|
|
700
|
+
* @param actionName The action to engage
|
|
701
|
+
*
|
|
702
|
+
* @param newData The data change to insert during the action
|
|
703
|
+
*
|
|
704
|
+
*/
|
|
705
|
+
do(actionName: StateType, newData?: mDT): boolean;
|
|
686
706
|
/********
|
|
687
707
|
*
|
|
688
708
|
* Instruct the machine to complete a transition. Synonym for {@link go}.
|
package/dist/es6/jssm.js
CHANGED
|
@@ -1724,7 +1724,7 @@ class Machine {
|
|
|
1724
1724
|
}
|
|
1725
1725
|
/********
|
|
1726
1726
|
*
|
|
1727
|
-
* Instruct the machine to complete an action.
|
|
1727
|
+
* Instruct the machine to complete an action. Synonym for {@link do}.
|
|
1728
1728
|
*
|
|
1729
1729
|
* ```typescript
|
|
1730
1730
|
* const light = sm`red 'next' -> green 'next' -> yellow 'next' -> red; [red yellow green] 'shutdown' ~> off 'start' -> red;`;
|
|
@@ -1744,6 +1744,28 @@ class Machine {
|
|
|
1744
1744
|
action(actionName, newData) {
|
|
1745
1745
|
return this.transition_impl(actionName, newData, false, true);
|
|
1746
1746
|
}
|
|
1747
|
+
/********
|
|
1748
|
+
*
|
|
1749
|
+
* Instruct the machine to complete an action. Synonym for {@link action}.
|
|
1750
|
+
*
|
|
1751
|
+
* ```typescript
|
|
1752
|
+
* const light = sm`red 'next' -> green 'next' -> yellow 'next' -> red; [red yellow green] 'shutdown' ~> off 'start' -> red;`;
|
|
1753
|
+
*
|
|
1754
|
+
* light.state(); // 'red'
|
|
1755
|
+
* light.do('next'); // true
|
|
1756
|
+
* light.state(); // 'green'
|
|
1757
|
+
* ```
|
|
1758
|
+
*
|
|
1759
|
+
* @typeparam mDT The type of the machine data member; usually omitted
|
|
1760
|
+
*
|
|
1761
|
+
* @param actionName The action to engage
|
|
1762
|
+
*
|
|
1763
|
+
* @param newData The data change to insert during the action
|
|
1764
|
+
*
|
|
1765
|
+
*/
|
|
1766
|
+
do(actionName, newData) {
|
|
1767
|
+
return this.transition_impl(actionName, newData, false, true);
|
|
1768
|
+
}
|
|
1747
1769
|
/********
|
|
1748
1770
|
*
|
|
1749
1771
|
* Instruct the machine to complete a transition. Synonym for {@link go}.
|
package/dist/es6/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const version = "5.77.
|
|
1
|
+
const version = "5.77.1";
|
|
2
2
|
export { version };
|