2
0
Fork 0
mirror of https://github.com/gchq/CyberChef synced 2025-03-14 05:46:56 +00:00

Patch: Linter fixes

This commit is contained in:
Niall 2024-08-23 21:17:34 +00:00
parent 10865d8a24
commit 0e78f8416d

View file

@ -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]);
}
}