jssm 5.64.2 → 5.65.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.
@@ -4,9 +4,57 @@ JssmMachineInternalState, JssmParseTree, JssmStateDeclaration, JssmArrow, JssmAr
4
4
  import { seq, weighted_rand_select, weighted_sample_select, histograph, weighted_histo_key } from './jssm_util';
5
5
  import { shapes, gviz_shapes, named_colors } from './jssm_constants';
6
6
  import { version } from './version';
7
+ /*********
8
+ *
9
+ * Return the direction of an arrow - `right`, `left`, or `both`.
10
+ *
11
+ * ```typescript
12
+ * import { arrow_direction } from './jssm';
13
+ *
14
+ * arrow_direction('->'); // 'right'
15
+ * arrow_direction('<~=>'); // 'both'
16
+ * ```
17
+ *
18
+ */
7
19
  declare function arrow_direction(arrow: JssmArrow): JssmArrowDirection;
20
+ /*********
21
+ *
22
+ * Return the direction of an arrow - `right`, `left`, or `both`.
23
+ *
24
+ * ```typescript
25
+ * import { arrow_left_kind } from './jssm';
26
+ *
27
+ * arrow_left_kind('<-'); // 'legal'
28
+ * arrow_left_kind('<='); // 'main'
29
+ * arrow_left_kind('<~'); // 'forced'
30
+ * arrow_left_kind('<->'); // 'legal'
31
+ * arrow_left_kind('->'); // 'none'
32
+ * ```
33
+ *
34
+ */
8
35
  declare function arrow_left_kind(arrow: JssmArrow): JssmArrowKind;
36
+ /*********
37
+ *
38
+ * Return the direction of an arrow - `right`, `left`, or `both`.
39
+ *
40
+ * ```typescript
41
+ * import { arrow_left_kind } from './jssm';
42
+ *
43
+ * arrow_left_kind('->'); // 'legal'
44
+ * arrow_left_kind('=>'); // 'main'
45
+ * arrow_left_kind('~>'); // 'forced'
46
+ * arrow_left_kind('<->'); // 'legal'
47
+ * arrow_left_kind('<-'); // 'none'
48
+ * ```
49
+ *
50
+ */
9
51
  declare function arrow_right_kind(arrow: JssmArrow): JssmArrowKind;
52
+ /*********
53
+ *
54
+ * Internal convenience method for alting out an object as the options call.
55
+ * Not generally meant for external use.
56
+ *
57
+ */
10
58
  declare function wrap_parse(input: string, options?: Object): any;
11
59
  declare function compile<mDT>(tree: JssmParseTree): JssmGenericConfig<mDT>;
12
60
  declare function make<mDT>(plan: string): JssmGenericConfig<mDT>;
package/dist/es6/jssm.js CHANGED
@@ -6,6 +6,18 @@ import { parse } from './jssm-dot';
6
6
  import { version } from './version'; // replaced from package.js in build
7
7
  import { JssmError } from './jssm_error';
8
8
  /* eslint-disable complexity */
9
+ /*********
10
+ *
11
+ * Return the direction of an arrow - `right`, `left`, or `both`.
12
+ *
13
+ * ```typescript
14
+ * import { arrow_direction } from './jssm';
15
+ *
16
+ * arrow_direction('->'); // 'right'
17
+ * arrow_direction('<~=>'); // 'both'
18
+ * ```
19
+ *
20
+ */
9
21
  function arrow_direction(arrow) {
10
22
  switch (String(arrow)) {
11
23
  case '->':
@@ -59,6 +71,21 @@ function arrow_direction(arrow) {
59
71
  }
60
72
  /* eslint-enable complexity */
61
73
  /* eslint-disable complexity */
74
+ /*********
75
+ *
76
+ * Return the direction of an arrow - `right`, `left`, or `both`.
77
+ *
78
+ * ```typescript
79
+ * import { arrow_left_kind } from './jssm';
80
+ *
81
+ * arrow_left_kind('<-'); // 'legal'
82
+ * arrow_left_kind('<='); // 'main'
83
+ * arrow_left_kind('<~'); // 'forced'
84
+ * arrow_left_kind('<->'); // 'legal'
85
+ * arrow_left_kind('->'); // 'none'
86
+ * ```
87
+ *
88
+ */
62
89
  function arrow_left_kind(arrow) {
63
90
  switch (String(arrow)) {
64
91
  case '->':
@@ -101,6 +128,21 @@ function arrow_left_kind(arrow) {
101
128
  }
102
129
  /* eslint-enable complexity */
103
130
  /* eslint-disable complexity */
131
+ /*********
132
+ *
133
+ * Return the direction of an arrow - `right`, `left`, or `both`.
134
+ *
135
+ * ```typescript
136
+ * import { arrow_left_kind } from './jssm';
137
+ *
138
+ * arrow_left_kind('->'); // 'legal'
139
+ * arrow_left_kind('=>'); // 'main'
140
+ * arrow_left_kind('~>'); // 'forced'
141
+ * arrow_left_kind('<->'); // 'legal'
142
+ * arrow_left_kind('<-'); // 'none'
143
+ * ```
144
+ *
145
+ */
104
146
  function arrow_right_kind(arrow) {
105
147
  switch (String(arrow)) {
106
148
  case '<-':
@@ -142,6 +184,12 @@ function arrow_right_kind(arrow) {
142
184
  }
143
185
  }
144
186
  /* eslint-enable complexity */
187
+ /*********
188
+ *
189
+ * Internal method meant to perform factory assembly of an edge. Not meant for
190
+ * external use.
191
+ *
192
+ */
145
193
  function makeTransition(this_se, from, to, isRight, _wasList, _wasIndex) {
146
194
  const kind = isRight ? arrow_right_kind(this_se.kind) : arrow_left_kind(this_se.kind), edge = {
147
195
  from,
@@ -172,6 +220,12 @@ function makeTransition(this_se, from, to, isRight, _wasList, _wasIndex) {
172
220
  }
173
221
  return edge;
174
222
  }
223
+ /*********
224
+ *
225
+ * Internal convenience method for alting out an object as the options call.
226
+ * Not generally meant for external use.
227
+ *
228
+ */
175
229
  function wrap_parse(input, options) {
176
230
  return parse(input, options || {});
177
231
  }
@@ -1,2 +1,2 @@
1
- const version = "5.64.2";
1
+ const version = "5.65.2";
2
2
  export { version };