@hkdigital/lib-core 0.5.54 → 0.5.56
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.
|
@@ -264,7 +264,7 @@ export default class Logger extends EventEmitter {
|
|
|
264
264
|
...this.#defaultContext
|
|
265
265
|
};
|
|
266
266
|
|
|
267
|
-
const childName = `${this.name}
|
|
267
|
+
const childName = `${this.name}>${name}`;
|
|
268
268
|
|
|
269
269
|
const child = new Logger(childName, level ?? this.level, context);
|
|
270
270
|
|
|
@@ -161,6 +161,19 @@ export default class PageMachine {
|
|
|
161
161
|
* ```
|
|
162
162
|
*/
|
|
163
163
|
hasVisited(state: string): boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Check if the start state has been visited
|
|
166
|
+
*
|
|
167
|
+
* @returns {boolean} True if the start state has been visited
|
|
168
|
+
*
|
|
169
|
+
* @example
|
|
170
|
+
* ```javascript
|
|
171
|
+
* if (machine.hasVisitedStart) {
|
|
172
|
+
* // User has been to the start page
|
|
173
|
+
* }
|
|
174
|
+
* ```
|
|
175
|
+
*/
|
|
176
|
+
get hasVisitedStart(): boolean;
|
|
164
177
|
/**
|
|
165
178
|
* Get all visited states
|
|
166
179
|
*
|
|
@@ -516,6 +516,22 @@ export default class PageMachine {
|
|
|
516
516
|
return this.#visitedStates.has(state);
|
|
517
517
|
}
|
|
518
518
|
|
|
519
|
+
/**
|
|
520
|
+
* Check if the start state has been visited
|
|
521
|
+
*
|
|
522
|
+
* @returns {boolean} True if the start state has been visited
|
|
523
|
+
*
|
|
524
|
+
* @example
|
|
525
|
+
* ```javascript
|
|
526
|
+
* if (machine.hasVisitedStart) {
|
|
527
|
+
* // User has been to the start page
|
|
528
|
+
* }
|
|
529
|
+
* ```
|
|
530
|
+
*/
|
|
531
|
+
get hasVisitedStart() {
|
|
532
|
+
return this.hasVisited(this.#startState);
|
|
533
|
+
}
|
|
534
|
+
|
|
519
535
|
/**
|
|
520
536
|
* Get all visited states
|
|
521
537
|
*
|