Skip to content

Function: withStatKeyAccessor() ​

ts
function withStatKeyAccessor(stats: ProfileStat[]): ProfileStats;

wraps a raw ProfileStat[] with the .StatKey.<Gamemode>.<Stat> accessor indexed via a Map for O(1) reads without mutating the caller's input array.

Parameters ​

ParameterType
statsProfileStat[]

Returns ​

ProfileStats

Distributed under the MIT License.