mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
Patch: Linter fixes
This commit is contained in:
parent
10865d8a24
commit
0e78f8416d
1 changed files with 2 additions and 2 deletions
|
@ -41,13 +41,13 @@ class InsertDelimiter extends Operation {
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
run(input, args) {
|
run(input, args) {
|
||||||
if (!input) return ""
|
if (!input) return "";
|
||||||
|
|
||||||
if (isNaN(args[0]) || args[0] <= 0) {
|
if (isNaN(args[0]) || args[0] <= 0) {
|
||||||
return "Invalid interval: must be a positive integer.";
|
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]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue