We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d578e05 commit 8ba2b05Copy full SHA for 8ba2b05
src/utils.ts
@@ -51,19 +51,3 @@ export function wrapHash(hash: (msg: Uint8Array) => Uint8Array) {
51
return hash(msg);
52
};
53
}
54
-
55
-declare const globalThis: Record<string, any> | undefined;
56
57
-// TODO(v3): switch away from node crypto, remove this unnecessary variable.
58
-export const crypto: { node?: any; web?: any } = (() => {
59
- const webCrypto =
60
- typeof globalThis === "object" && "crypto" in globalThis ? globalThis.crypto : undefined;
61
- const nodeRequire =
62
- typeof module !== "undefined" &&
63
- typeof module.require === "function" &&
64
- module.require.bind(module);
65
- return {
66
- node: nodeRequire && !webCrypto ? nodeRequire("crypto") : undefined,
67
- web: webCrypto
68
- };
69
-})();
0 commit comments