Binato/server/util/getUserById.js

6 lines
No EOL
166 B
JavaScript

module.exports = function(id) {
for (let i = 0; i < global.users.length; i++) {
if (global.users[i].id == id)
return global.users[i];
}
}