10 lines
No EOL
234 B
JavaScript
10 lines
No EOL
234 B
JavaScript
module.exports = function(id) {
|
|
let user = null;
|
|
for (let i = 0; i < global.users.length; i++) {
|
|
if (global.users[i].id == id) {
|
|
user = global.users[i];
|
|
break;
|
|
}
|
|
}
|
|
return user;
|
|
} |