UNPKG

@aws-amplify/core

Version:
24 lines (22 loc) 753 B
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 const globalExists = () => { return typeof global !== 'undefined'; }; const globalThisExists = () => { return typeof globalThis !== 'undefined'; }; const windowExists = () => { return typeof window !== 'undefined'; }; const documentExists = () => { return typeof document !== 'undefined'; }; const processExists = () => { return typeof process !== 'undefined'; }; const keyPrefixMatch = (object, prefix) => { return !!Object.keys(object).find(key => key.startsWith(prefix)); }; export { documentExists, globalExists, globalThisExists, keyPrefixMatch, processExists, windowExists }; //# sourceMappingURL=helpers.mjs.map