1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-22 22:16:13 -04:00

New: Natural Sorting Manual Import Relative Paths

Closes #4956
This commit is contained in:
Mark McDowall
2022-04-09 21:19:12 -07:00
parent f678775e5c
commit bdd5865876
3 changed files with 16 additions and 2 deletions
+3 -1
View File
@@ -1,9 +1,11 @@
const regex = /\b\w+/g;
function titleCase(input) {
if (!input) {
return '';
}
return input.replace(/\b\w+/g, (match) => {
return input.replace(regex, (match) => {
return match.charAt(0).toUpperCase() + match.substr(1).toLowerCase();
});
}