From fe1ba2ad6affeb6c0e97c73171d8fa3f31dde73e Mon Sep 17 00:00:00 2001 From: Markus Hatvan Date: Thu, 14 Oct 2021 13:24:58 +0200 Subject: chore: convert files to TS (#2066) --- src/helpers/userAgent-helpers.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/helpers/userAgent-helpers.ts') diff --git a/src/helpers/userAgent-helpers.ts b/src/helpers/userAgent-helpers.ts index 091a76400..c1e8e02da 100644 --- a/src/helpers/userAgent-helpers.ts +++ b/src/helpers/userAgent-helpers.ts @@ -1,13 +1,18 @@ -import os from 'os'; +import { cpus } from 'os'; import macosVersion from 'macos-version'; import { chrome } from 'useragent-generator'; import { - chromeVersion, isMac, isWindows, is64Bit, osArch, osRelease, + chromeVersion, + isMac, + isWindows, + is64Bit, + osArch, + osRelease, } from '../environment'; function macOS() { const version = macosVersion() || ''; - let cpuName = os.cpus()[0].model.split(' ')[0]; + let cpuName = cpus()[0].model.split(' ')[0]; if (cpuName && /\(/.test(cpuName)) { cpuName = cpuName.split('(')[0]; } -- cgit v1.2.3-70-g09d2