Uniqueness check
Full path to the JavaScript file
src/user/search.js
Function(s)/scope targeted
filterAndSortUids
Relevant Qlty output
Function with high complexity (count = 11): filterAndSortUids
137 async function filterAndSortUids(uids, data) {
138 uids = uids.filter(uid => parseInt(uid, 10) || activitypub.helpers.isUri(uid));
139 let filters = data.filters || [];
140 filters = Array.isArray(filters) ? filters : [data.filters];
141 const fields = [];
142
[hid 40 additional lines]
Qlty detects complexity of functions based on the number of independent paths that functions creates (eg, with if or switch statements. The more you have, the harder it is to achieve full test coverage and to read the code. This function currently has 11 of such independent paths.
Uniqueness check
Full path to the JavaScript file
src/user/search.js
Function(s)/scope targeted
filterAndSortUids
Relevant Qlty output
Function with high complexity (count = 11): filterAndSortUids 137 async function filterAndSortUids(uids, data) { 138 uids = uids.filter(uid => parseInt(uid, 10) || activitypub.helpers.isUri(uid)); 139 let filters = data.filters || []; 140 filters = Array.isArray(filters) ? filters : [data.filters]; 141 const fields = []; 142 [hid 40 additional lines]Qlty detects complexity of functions based on the number of independent paths that functions creates (eg, with if or switch statements. The more you have, the harder it is to achieve full test coverage and to read the code. This function currently has 11 of such independent paths.