UNPKG

1.04 kBSource Map (JSON)View Raw
1{"version":3,"file":"globalCrypto.js","sourceRoot":"","sources":["../../../src/utils/globalCrypto.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,yDAAyD;AACzD,MAAM,SAAS,GAAQ,OAAO,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;AAEnE,IAAI,CAAC,SAAS,EAAE;IACd,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;CAC1C;AAED,MAAM,YAAY,GAAW,SAAS,CAAC,MAAM,IAAI,SAAS,CAAC,QAAQ,CAAC;AAEpE,IAAI,CAAC,YAAY,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE;IACzC,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;CACpE;AAED,OAAO,EAAE,YAAY,EAAE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// eslint-disable-next-line @azure/azure-sdk/ts-no-window\nconst globalRef: any = typeof self === \"undefined\" ? window : self;\n\nif (!globalRef) {\n throw new Error(\"Could not find global\");\n}\n\nconst globalCrypto: Crypto = globalRef.crypto || globalRef.msCrypto;\n\nif (!globalCrypto || !globalCrypto.subtle) {\n throw new Error(\"Browser does not support cryptography functions\");\n}\n\nexport { globalCrypto };\n"]}
\No newline at end of file