Uniqueness check
Full path to the JavaScript file
src/groups/user.js
Function(s)/scope targeted
module.exports
Relevant Qlty output
Function with many returns (count = 6): exports
6 module.exports = function (Groups) {
7 Groups.getUsersFromSet = async function (set, fields = []) {
8 const uids = await db.getSetMembers(set);
9 const userData = await user.getUsersFields(uids, fields);
10 return userData.filter(u => u && u.uid);
11 };
[hid 52 additional lines]
The issue here is that there are numerous exit points, making the code much harder to follow.
Uniqueness check
Full path to the JavaScript file
src/groups/user.js
Function(s)/scope targeted
module.exports
Relevant Qlty output
Function with many returns (count = 6): exports 6 module.exports = function (Groups) { 7 Groups.getUsersFromSet = async function (set, fields = []) { 8 const uids = await db.getSetMembers(set); 9 const userData = await user.getUsersFields(uids, fields); 10 return userData.filter(u => u && u.uid); 11 }; [hid 52 additional lines]The issue here is that there are numerous exit points, making the code much harder to follow.