Added optional padding for equal length.
This commit is contained in:
@@ -209,6 +209,7 @@
|
||||
.replace(/[^a-z0-9]/g, ' ')
|
||||
.replace(/\s+/g, ' ')
|
||||
.trim();
|
||||
// .padEnd(20, '#');
|
||||
}
|
||||
|
||||
function getCode() {
|
||||
@@ -222,7 +223,7 @@
|
||||
const decoded = base32.decode(codeInput.value);
|
||||
const capitalized = decoded.split(' ').map((word) => `${word.slice(0, 1).toUpperCase()}${word.slice(1)}`).join(' ');
|
||||
|
||||
nameOutput.value = capitalized;
|
||||
nameOutput.value = capitalized.replace(/#+$/, '');
|
||||
}
|
||||
|
||||
nameInput.addEventListener('input', () => getCode());
|
||||
|
||||
Reference in New Issue
Block a user