const str = "<Sum> [stat]player_ammo_restored = 440360\n<Sum> [stat]player_climb_assists = 18256\n<Sum> [stat]player_climb_coops = 9874\n<Sum> [stat]player_damage = 519358590\n<Sum> [mode]PVE [stat]player_deaths = 23551\n<Sum>"
const getMatch = (el, regexp) => el.match(regexp)[0].trim()
const ddo = (str) => str.split(/<Sum>/).reduce((acc, el) => {
if (!el) return acc
const key = getMatch(el, /.*(?=\=)/)
const value = +getMatch(el, /(?<=\=).*/)
acc[key] = value
return acc
} ,{})
}
console.log(ddo(str))
Пока так