UNPKG

@aws-amplify/core

Version:
1 lines 759 B
{"version":3,"file":"isWebWorker.mjs","sources":["../../../src/utils/isWebWorker.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const isWebWorker = () => {\n if (typeof self === 'undefined') {\n return false;\n }\n const selfContext = self;\n return (typeof selfContext.WorkerGlobalScope !== 'undefined' &&\n self instanceof selfContext.WorkerGlobalScope);\n};\n"],"names":[],"mappings":"AAAA;AACA;AACY,MAAC,WAAW,GAAG,MAAM;AACjC,IAAI,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;AACrC,QAAQ,OAAO,KAAK,CAAC;AACrB,KAAK;AACL,IAAI,MAAM,WAAW,GAAG,IAAI,CAAC;AAC7B,IAAI,QAAQ,OAAO,WAAW,CAAC,iBAAiB,KAAK,WAAW;AAChE,QAAQ,IAAI,YAAY,WAAW,CAAC,iBAAiB,EAAE;AACvD;;;;"}