From 51ba358464ce5787ef472531e0bdb2b6b239955e Mon Sep 17 00:00:00 2001 From: Markus-D-M <105434903+Markus-D-M@users.noreply.github.com> Date: Wed, 25 May 2022 21:27:58 +0200 Subject: [PATCH] Update codingcontracttypes.ts prettier --- src/data/codingcontracttypes.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/data/codingcontracttypes.ts b/src/data/codingcontracttypes.ts index 9c76f0481..5effe8d73 100644 --- a/src/data/codingcontracttypes.ts +++ b/src/data/codingcontracttypes.ts @@ -1833,11 +1833,11 @@ export const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [ // data = [plaintext, keyword] // build char array, shifting via map and corresponding keyword letter and join to final results const cipher = [...data[0]] - .map((a, i) => - (a === " " + .map((a, i) => { + return a === " " ? a - : String.fromCharCode(((a.charCodeAt(0) - 2 * 65 + data[1].charCodeAt(i % data[1].length)) % 26) + 65)), - ) + : String.fromCharCode(((a.charCodeAt(0) - 2 * 65 + data[1].charCodeAt(i % data[1].length)) % 26) + 65); + }) .join(""); return cipher === ans; },