66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
for (let lSugg of this.dSugg.values()) {
for (let sSugg of lSugg) { lRes.push(sSugg); }
if (lRes.length > nSuggLimit) {
break;
}
}
lRes = char_player.filterSugg(lRes);
if (this.sWord.gl_isTitle()) {
lRes = lRes.map((sSugg) => { return sSugg.gl_toCapitalize(); });
}
else if (this.sWord.gl_isUpperCase()) {
lRes = lRes.map((sSugg) => { return sSugg.toUpperCase(); });
}
return lRes.slice(0, nSuggLimit);
}
reset () {
this.aSugg.clear();
this.dSugg.clear();
}
|
|
|
|
|
>
|
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
for (let lSugg of this.dSugg.values()) {
for (let sSugg of lSugg) { lRes.push(sSugg); }
if (lRes.length > nSuggLimit) {
break;
}
}
lRes = char_player.filterSugg(lRes);
if (this.sWord.gl_isUpperCase()) {
lRes = lRes.map((sSugg) => { return sSugg.toUpperCase(); });
}
else if (this.sWord.slice(0,1).gl_isUpperCase()) {
lRes = lRes.map((sSugg) => { return sSugg.slice(0, 1).toUpperCase() + sSugg.slice(1); });
}
return lRes.slice(0, nSuggLimit);
}
reset () {
this.aSugg.clear();
this.dSugg.clear();
}
|