canvas-editor-engine 1.0.67 → 1.0.69
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/utils/guid4.d.ts +1 -1
- package/dist/utils/guid4.js +10 -5
- package/package.json +1 -1
package/dist/utils/guid4.d.ts
CHANGED
package/dist/utils/guid4.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.Guid4 = void 0;
|
4
4
|
class Guid4 {
|
5
|
-
|
5
|
+
stack = [];
|
6
6
|
guid4;
|
7
7
|
constructor() {
|
8
8
|
this.generate(this.attempt);
|
@@ -14,9 +14,9 @@ class Guid4 {
|
|
14
14
|
getFactor(guid4) {
|
15
15
|
return (attempt) => {
|
16
16
|
guid4 = this.Guid4;
|
17
|
-
if (!
|
17
|
+
if (!this.stack.includes(guid4)) {
|
18
18
|
attempt.current = attempt.max;
|
19
|
-
|
19
|
+
this.stack.push(guid4);
|
20
20
|
}
|
21
21
|
};
|
22
22
|
}
|
@@ -45,8 +45,13 @@ class Guid4 {
|
|
45
45
|
return formattedChar.toString(16);
|
46
46
|
}
|
47
47
|
get finite() {
|
48
|
-
const
|
49
|
-
|
48
|
+
const guid4 = this.stack[this.stack?.length];
|
49
|
+
if (!!guid4) {
|
50
|
+
return guid4;
|
51
|
+
}
|
52
|
+
else {
|
53
|
+
throw new Error("Guid4 not generate");
|
54
|
+
}
|
50
55
|
}
|
51
56
|
;
|
52
57
|
}
|