mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-27 16:17:22 +00:00
11 lines
313 B
TypeScript
11 lines
313 B
TypeScript
import { OS } from '../types';
|
|
|
|
// slice to get the last part of the url that includes the os
|
|
export const getOS = (url: string): OS =>
|
|
url?.slice(46).includes('darwin')
|
|
? 'darwin'
|
|
: url?.slice(46).includes('linux')
|
|
? 'linux'
|
|
: url?.slice(46).includes('windows')
|
|
? 'windows'
|
|
: 'mobile';
|