fix lint rules and small readme improve
This commit is contained in:
@@ -15,12 +15,10 @@ function extractDigits(line) {
|
||||
let digitsFound = [];
|
||||
let i = 0;
|
||||
while (i < line.length) {
|
||||
let matched = false;
|
||||
for (const [word, digit] of Object.entries(digitMap)) {
|
||||
if (line.startsWith(word, i)) {
|
||||
digitsFound.push(digit);
|
||||
i += word.length - 1; // Advance the index
|
||||
matched = true;
|
||||
i += word.length - 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user