From 36afc90d2fe8c4c21456057b8853b8d390c1a66c Mon Sep 17 00:00:00 2001 From: Mohit Tejani Date: Mon, 25 Sep 2023 11:45:12 +0530 Subject: [PATCH] let vs const --- src/crypto/modules/NodeCryptoModule/nodeCryptoModule.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/crypto/modules/NodeCryptoModule/nodeCryptoModule.ts b/src/crypto/modules/NodeCryptoModule/nodeCryptoModule.ts index 742235f13..baabaef7b 100644 --- a/src/crypto/modules/NodeCryptoModule/nodeCryptoModule.ts +++ b/src/crypto/modules/NodeCryptoModule/nodeCryptoModule.ts @@ -147,7 +147,7 @@ export default class CryptoModule { } if (file.data instanceof Readable) { - let stream = file.data; + const stream = file.data; return new Promise((resolve) => { stream.on('readable', () => resolve(this.onStreamReadable(stream, file, File))); }); @@ -243,12 +243,12 @@ class CryptorHeader { } static tryGetMetadataSizeFromStream(stream: NodeJS.ReadableStream) { - let sizeBuf = stream.read(1); + const sizeBuf = stream.read(1); if (sizeBuf && (sizeBuf[0] as number) < 255) { return sizeBuf[0] as number; } if ((sizeBuf[0] as number) === 255) { - let nextBuf = stream.read(2); + const nextBuf = stream.read(2); if (nextBuf.length >= 2) { return new Uint16Array([nextBuf[0] as number, nextBuf[1] as number]).reduce((acc, val) => (acc << 8) + val, 0); }