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()
return childItems.sort((a, b) => {
const aTitle = getSaveItemTitle(a, saveGame);
const bTitle = getSaveItemTitle(b, saveGame);
return naturalCompare(aTitle, bTitle);
});
}
return this._tests.sort((t1, t2) => naturalCompare(t1.name, t2.name))
}
? this._tests.sort((t1, t2) => naturalCompare(t1.name, t2.name))
: this._tests