1 2 3 4 5 6
export function normalize(data, factor) { return data.map((player) => ({ ...player, level: Math.ceil(player.level / factor), })); }