mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-23 23:57:57 -05:00
10 lines
332 B
JavaScript
10 lines
332 B
JavaScript
|
/* eslint-disable max-len */
|
||
|
function isAllowedCharacter(character) {
|
||
|
return character !== '\xa7' && character >= ' ' && character !== '\x7f';
|
||
|
}
|
||
|
function containsIllegalCharacters(string) {
|
||
|
for (let i = 0; i < string.length; i++) if (!isAllowedCharacter(string[i])) return true;
|
||
|
}
|
||
|
|
||
|
module.exports = {containsIllegalCharacters};
|