forked from public/foundryvtt-reve-de-dragon
Ajout de notes chronologiques
This commit is contained in:
@ -19,10 +19,14 @@ export class Grammar {
|
||||
return word.match(/^[aeiouy]/i)
|
||||
}
|
||||
|
||||
static equalsInsensitive(a, b) {
|
||||
return Grammar.toLowerCaseNoAccent(a) == Grammar.toLowerCaseNoAccent(b)
|
||||
}
|
||||
|
||||
static includesLowerCaseNoAccent(value, content) {
|
||||
return Grammar.toLowerCaseNoAccent(value).includes(Grammar.toLowerCaseNoAccent(content));
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static toLowerCaseNoAccent(words) {
|
||||
return words?.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "") ?? words;
|
||||
|
Reference in New Issue
Block a user