UNPKG

507 BJavaScriptView Raw
1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT license.
3// eslint-disable-next-line @azure/azure-sdk/ts-no-window
4const globalRef = typeof self === "undefined" ? window : self;
5if (!globalRef) {
6 throw new Error("Could not find global");
7}
8const globalCrypto = globalRef.crypto || globalRef.msCrypto;
9if (!globalCrypto || !globalCrypto.subtle) {
10 throw new Error("Browser does not support cryptography functions");
11}
12export { globalCrypto };
13//# sourceMappingURL=globalCrypto.js.map
\No newline at end of file