Skip to content

five-on-it / apps/server/src/level-files / welcomeLevel

Function: welcomeLevel() ​

welcomeLevel(name, level, byHash): { data: LevelData; name: string; } | { name: string; ref: { bytes: number; hash: string; }; }

Defined in: apps/server/src/level-files.ts:63

What a welcome says of its level: the level itself (data), or, to a client that asked for it and when the level is big, its hash and length (ref).

Parameters ​

name ​

string

level ​

LevelData

byHash ​

boolean

Returns ​

{ data: LevelData; name: string; } | { name: string; ref: { bytes: number; hash: string; }; }