Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
tagListData.sort((a, b) => {
return naturalCompare.caseInsensitive(a.title, b.title);
});
return (a, b) => caseInsensitiveCompare(a, b)
}
.sort((vmA, vmB) => naturalCompare.caseInsensitive(vmA.get('name'), vmB.get('name')))
function sortByIdentifiersCount(a, b) {
if (a.count === b.count) {
return stringCompare(a.value, b.value)
}
return b.count - a.count
}
.sort((a, b) => {
if (a.selectors.length === b.selectors.length) {
return compareStrings.caseInsensitive(
a.selectors.join(''),
b.selectors.join('')
)
}
return a.selectors.length - b.selectors.length
})
const ruleWithLeastSelectors = [...rulesSortedBySelectorCount].shift()