Skip to content

Commit b4a586c

Browse files
Some lets to consts and removing of trailing spaces from grunt lint
1 parent dcff897 commit b4a586c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/core/operations/A1Z26CipherDecode.mjs

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ class A1Z26CipherDecode extends Operation {
4242
*/
4343
run(input, args) {
4444
const delim = Utils.charRep(args[0] || "Space");
45-
45+
4646
if (input.length === 0) {
4747
return [];
4848
}
4949

50-
let bites = input.split(delim),
51-
latin1 = "";
50+
const bites = input.split(delim);
51+
let latin1 = "";
5252
for (let i = 0; i < bites.length; i++) {
5353
if (bites[i] < 1 || bites[i] > 26) {
5454
throw new OperationError("Error: all numbers must be between 1 and 26.");

src/core/operations/A1Z26CipherEncode.mjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ class A1Z26CipherEncode extends Operation {
4242
run(input, args) {
4343
const delim = Utils.charRep(args[0] || "Space");
4444
let output = "";
45-
45+
4646
const sanitizedinput = input.toLowerCase(),
4747
charcode = Utils.strToCharcode(sanitizedinput);
4848

4949
for (let i = 0; i < charcode.length; i++) {
50-
let ordinal = charcode[i] - 96;
50+
const ordinal = charcode[i] - 96;
5151

5252
if (ordinal > 0 && ordinal <= 26) {
5353
output += ordinal.toString(10) + delim;

0 commit comments

Comments
 (0)