We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e802f1 commit de6d219Copy full SHA for de6d219
src/core/index.js
@@ -86,20 +86,15 @@ const Resolver = {
86
}
87
},
88
uuid: () => {
89
- return window.crypto !== undefined ? window.crypto.randomUUID() : '' + Date.now()
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'
90
+ .replace(/[xy]/g, function (c) {
91
+ const r = Math.random() * 16 | 0,
92
+ v = c == 'x' ? r : (r & 0x3 | 0x8);
93
+ return v.toString(16);
94
+ });
95
96
97
-// add the randomUUID option to crypto
-window.crypto.randomUUID = function () {
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'
- .replace(/[xy]/g, function (c) {
- const r = Math.random() * 16 | 0,
98
- v = c == 'x' ? r : (r & 0x3 | 0x8);
99
- return v.toString(16);
100
- });
101
-}
102
-
103
export {
104
Attachment,
105
When,
0 commit comments