Skip to content

Commit 512c5f9

Browse files
committed
chore: CryptoKey is exported separately and therefore this is redundant
1 parent 31a183b commit 512c5f9

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

lib/isomorphic-crypto.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@ const impl = await (typeof globalThis !== 'undefined' && globalThis.crypto
77
? globalThis.crypto
88
: import('node:crypto'));
99

10-
// we only export SubtleCrypto to make sure the interface remains the same
10+
// we only export the values we use to keep things simple, we dont need a fully
11+
// cross platform compatible crypto library
1112
export const crypto = {
1213
getRandomValues: <T extends Uint8Array>(array: T) =>
1314
'webcrypto' in impl
1415
? impl.webcrypto.getRandomValues(array)
1516
: impl.getRandomValues(array),
16-
CryptoKey:
17-
'webcrypto' in impl ? impl.webcrypto.CryptoKey : globalThis.CryptoKey,
1817
subtle: 'webcrypto' in impl ? impl.webcrypto.subtle : impl.subtle,
1918
};
2019

0 commit comments

Comments
 (0)