mirror of
https://github.com/gchq/CyberChef.git
synced 2026-03-18 04:41:40 -07:00
Fixing linting issues
This commit is contained in:
parent
c2dce58db2
commit
27e4d7e3bb
1 changed files with 2 additions and 4 deletions
|
|
@ -63,9 +63,7 @@ class WordCount extends Operation {
|
|||
for (let j = 0; j < inputArray.length; j++) {
|
||||
|
||||
// Trim whitespace and replace punctuation
|
||||
const word = inputArray[j].replace(/[!"#\$%&\(\)\*\+,-\.\/:;<=>\?@\[\\\]\^_`\{\\}~£\|]/g, "").trim();
|
||||
|
||||
|
||||
const word = inputArray[j].replace(/[!"#$%&()*+,-./:;<=>?@[\\\]^_`{}~£|]/g, "").trim();
|
||||
|
||||
// If empty string or ', then skip
|
||||
if (word === "" || /[']+/.test(word)) {
|
||||
|
|
@ -102,7 +100,7 @@ class WordCount extends Operation {
|
|||
|
||||
// Process output to string
|
||||
let output = "WORD,COUNT\n";
|
||||
output = output + order.map(entry => `${entry},${counter[entry]}`).join('\n');
|
||||
output = output + order.map(entry => `${entry},${counter[entry]}`).join("\n");
|
||||
|
||||
// Add total counter at the bottom
|
||||
if (args[1]) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue