@aws-amplify/core
Version:
Core category of aws-amplify
14 lines (12 loc) • 427 B
JavaScript
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
const isWebWorker = () => {
if (typeof self === 'undefined') {
return false;
}
const selfContext = self;
return (typeof selfContext.WorkerGlobalScope !== 'undefined' &&
self instanceof selfContext.WorkerGlobalScope);
};
export { isWebWorker };
//# sourceMappingURL=isWebWorker.mjs.map