This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.
2021-04-02 02:24:13 +03:00

1 line
1.3 KiB
Plaintext

{"version":3,"file":"Platform.js","sourceRoot":"","sources":["../src/Platform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,mBAAmB,EAAkB,MAAM,cAAc,CAAC;AAE/E,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAMvD,MAAM,QAAQ,GAAG;IACf;;;OAGG;IACH,EAAE,EAAE,mBAAmB,CAAC,EAAE;IAC1B;;;;;;;OAOG;IACH,MAAM,EAAE,mBAAmB,CAAC,MAAwB;IACpD;;;OAGG;IACH,cAAc;CACf,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import { Platform as ReactNativePlatform, PlatformOSType } from 'react-native';\n\nimport { isDOMAvailable } from './environment/browser';\n\nexport type PlatformSelectOSType = PlatformOSType | 'native' | 'electron' | 'default';\n\nexport type PlatformSelect = <T>(specifics: { [platform in PlatformSelectOSType]?: T }) => T;\n\nconst Platform = {\n /**\n * Denotes the currently running platform.\n * Can be one of ios, android, web.\n */\n OS: ReactNativePlatform.OS,\n /**\n * Returns the value with the matching platform.\n * Object keys can be any of ios, android, native, web, default.\n *\n * @ios ios, native, default\n * @android android, native, default\n * @web web, default\n */\n select: ReactNativePlatform.select as PlatformSelect,\n /**\n * Denotes if the DOM API is available in the current environment.\n * The DOM is not available in native React runtimes and Node.js.\n */\n isDOMAvailable,\n};\n\nexport default Platform;\n"]}