style: convert the readableHandlerPredict function to an arrow function

This commit is contained in:
Dorian Niemiec 2025-01-14 19:16:43 +01:00
parent ca4558b8d5
commit e4518b934c

View file

@ -446,7 +446,7 @@ module.exports = (req, res, logFacilities, config, next) => {
}; };
//req.body //req.body
function readableHandlerPredict() { const readableHandlerPredict = () => {
try { try {
if (req._readableState.buffer.head !== null) { if (req._readableState.buffer.head !== null) {
requestBody = Buffer.from(req._readableState.buffer.head.data); 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); if (!requestBody) requestBody = Buffer.alloc(0);
modSecurityCallback(); modSecurityCallback();
} };
let chunkBuffer = []; let chunkBuffer = [];
let chunkBufferLength = Math.min( let chunkBufferLength = Math.min(