@aws-amplify/core
Version:
Core category of aws-amplify
1 lines • 972 B
Source Map (JSON)
{"version":3,"file":"Svelte.mjs","sources":["../../../../src/Platform/detection/Svelte.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { keyPrefixMatch, processExists, windowExists } from './helpers';\n// Tested with svelte 3.59\nexport function svelteWebDetect() {\n return windowExists() && keyPrefixMatch(window, '__SVELTE');\n}\nexport function svelteSSRDetect() {\n return (processExists() &&\n typeof process.env !== 'undefined' &&\n !!Object.keys(process.env).find(key => key.includes('svelte')));\n}\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACO,SAAS,eAAe,GAAG;AAClC,IAAI,OAAO,YAAY,EAAE,IAAI,cAAc,CAAC,MAAM,EAAE,UAAU,CAAC;AAC/D;AACO,SAAS,eAAe,GAAG;AAClC,IAAI,QAAQ,aAAa,EAAE;AAC3B,QAAQ,OAAO,OAAO,CAAC,GAAG,KAAK,WAAW;AAC1C,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACtE;;;;"}