(re: RegExp)
| 16 | |
| 17 | export const DEFAULT_LONG_PRESS_TIME = 500; |
| 18 | function testPlatform(re: RegExp) { |
| 19 | return typeof window !== 'undefined' && window.navigator != null |
| 20 | ? re.test(window.navigator['userAgentData']?.platform || window.navigator.platform) |
| 21 | : false; |
| 22 | } |
| 23 | |
| 24 | function cached(fn: () => boolean) { |
| 25 | if (process.env.NODE_ENV === 'test') { |