MCPcopy Create free account
hub / github.com/deta/surf / getPlatform

Function getPlatform

app/src/main/utils.ts:61–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59}
60
61export const getPlatform = () => {
62 const platform = import.meta.env.PLATFORM
63
64 if (platform === 'darwin') {
65 return 'mac'
66 }
67
68 if (platform === 'win32') {
69 return 'windows'
70 }
71
72 return 'linux'
73}
74
75export const isPathSafe = (basePath: string, filePath: string): boolean => {
76 return path.resolve(basePath, filePath).startsWith(path.resolve(basePath))

Callers 2

setupIpcHandlersFunction · 0.90
isDefaultBrowserFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected