From e4518b934cfdf5af89ab9c2b985abd69854415ac Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Tue, 14 Jan 2025 19:16:43 +0100 Subject: [PATCH] style: convert the readableHandlerPredict function to an arrow function --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 37d3242..009e565 100644 --- a/src/index.js +++ b/src/index.js @@ -446,7 +446,7 @@ module.exports = (req, res, logFacilities, config, next) => { }; //req.body - function readableHandlerPredict() { + const readableHandlerPredict = () => { try { if (req._readableState.buffer.head !== null) { requestBody = Buffer.from(req._readableState.buffer.head.data); @@ -457,7 +457,7 @@ module.exports = (req, res, logFacilities, config, next) => { } if (!requestBody) requestBody = Buffer.alloc(0); modSecurityCallback(); - } + }; let chunkBuffer = []; let chunkBufferLength = Math.min(