unify TimeTracker code, explicitly mark nullable playerCounts as unsafe
This commit is contained in:
11
lib/util.js
Normal file
11
lib/util.js
Normal file
@ -0,0 +1,11 @@
|
||||
function getPlayerCountOrNull (resp) {
|
||||
if (resp) {
|
||||
return resp.players.online
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getPlayerCountOrNull
|
||||
}
|
Reference in New Issue
Block a user