Skip to content

Commit

Permalink
Patch: Linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
0xff1ce committed Aug 23, 2024
1 parent 10865d8 commit 0e78f84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/operations/InsertDelimiter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ class InsertDelimiter extends Operation {
* @returns {string}
*/
run(input, args) {
if (!input) return ""
if (!input) return "";

if (isNaN(args[0]) || args[0] <= 0) {
return "Invalid interval: must be a positive integer.";
}

return input.match(new RegExp(`.{1,${parseInt(args[0])}}`, "g")).join(args[1]);
return input.match(new RegExp(`.{1,${parseInt(args[0], 10)}}`, "g")).join(args[1]);
}
}

Expand Down

0 comments on commit 0e78f84

Please sign in to comment.