A games launcher for GOG, Amazon and Epic Games for Linux, Windows and macOS.
TypeScript amazon-primeelectronepic-games-launcherepic-games-storeepic-storegaminggoggog-galaxyheroic-games-launcherlinuxplay-gamesprotonsteamwine
const MAX_LOG_LINES = 500
const MAX_LOG_CHARACTERS = 1_000_000
/**
* Reports are pasted into GitHub issues, so long logs should be downloaded
* instead of copied to the clipboard.
*/
export function isLogTooLarge(log: string): boolean {
if (log.length > MAX_LOG_CHARACTERS) return true
const lines = log.split(/\r?\n/)
if (lines.at(-1) === '') lines.pop()
return lines.length > MAX_LOG_LINES
}