mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
refactor(es modules): continue migration
This commit is contained in:
parent
a929667796
commit
eaa0046e67
8 changed files with 103 additions and 74 deletions
|
|
@ -8,7 +8,7 @@ function vowel(c) {
|
|||
|
||||
// remove vowels from the end of the string
|
||||
function trimVowels(string, minLength = 3) {
|
||||
while (string.length > minLength && vowel(last(string))) {
|
||||
while (string.length > minLength && vowel(string.at(-1))) {
|
||||
string = string.slice(0, -1);
|
||||
}
|
||||
return string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue