File mappings.ts
has 407 lines of code (exceeds 250 allowed). Consider refactoring.
interface MappingsObject {
[character: string]: string[];
}
File mappings.js
has 405 lines of code (exceeds 250 allowed). Consider refactoring.
export const mappings = {
"A": ["4",
"π ", "π", "πΌ", "π¨", "π", "π", "π°",
"AΜ²",
"π", "π", "π΄", "π", "π¬",
Function unleetRecurse
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
const unleetRecurse = (lowerCaseLeetString: string,
unleetStrings: Set<string>,
previousStrings: Set<string>,
complexTranslationKeys: string[]) => {
Function unleetRecurse
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
const unleetRecurse = (lowerCaseLeetString, unleetStrings, previousStrings, complexTranslationKeys) => {
for (const leetSymbol of complexTranslationKeys) {
if (lowerCaseLeetString.includes(leetSymbol)) {
let matchingIndicies = utils.indiciesOf(lowerCaseLeetString, leetSymbol);
if (matchingIndicies.length === 0) {
Function unleet
has 26 lines of code (exceeds 25 allowed). Consider refactoring.
export const unleet = (leetString) => {
if (leetString === null || leetString === undefined || leetString === "") {
return [""];
}
let cleanLeetString = leetString.toString();
Function unleet
has 26 lines of code (exceeds 25 allowed). Consider refactoring.
export const unleet = (leetString: string | number): string[] => {
if (leetString === null || leetString === undefined || leetString === "") {
return [""];
}
Avoid deeply nested control flow statements.
if (potentialValue.includes(translationKey)) {
isSimple = false;
break;
}
Avoid deeply nested control flow statements.
if (!previousStrings.has(newString)) {
previousStrings.add(newString);
unleetRecurse(newString, unleetStrings, previousStrings, complexTranslationKeys);
}
Avoid deeply nested control flow statements.
if (!previousStrings.has(newString)) {
previousStrings.add(newString);
unleetRecurse(newString, unleetStrings, previousStrings, complexTranslationKeys);
}
Avoid deeply nested control flow statements.
if (potentialValue.includes(translationKey)) {
isSimple = false;
break;
}
Function unleet
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
export const unleet = (leetString: string | number): string[] => {
if (leetString === null || leetString === undefined || leetString === "") {
return [""];
}
Function unleet
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
export const unleet = (leetString) => {
if (leetString === null || leetString === undefined || leetString === "") {
return [""];
}
let cleanLeetString = leetString.toString();