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 7a77c8e commit 1a2d8faCopy full SHA for 1a2d8fa
src/uuid.ts
@@ -14,8 +14,11 @@ if (process.env.PARSE_BUILD === 'weapp') {
14
s[8] = s[13] = s[18] = s[23] = '-';
15
return s.join('');
16
};
17
+} else if (process.env.PARSE_BUILD === 'browser') {
18
+ // Use native crypto.randomUUID() from the Web Crypto API in browsers
19
+ uuid = () => globalThis.crypto.randomUUID();
20
} else {
- // Use crypto.randomUUID() for Node, React Native, and browser builds
21
+ // Use Node.js crypto.randomUUID() for Node and React Native builds
22
uuid = require('crypto').randomUUID;
23
}
24
0 commit comments