From 7a36f011f5f792b0f13174315674ec8742e99686 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Thu, 26 Dec 2024 12:51:05 +0000 Subject: [PATCH] style: format code with StandardJS This commit fixes the style issues introduced in 421acdc according to the output from StandardJS. Details: None --- server/response.js | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/server/response.js b/server/response.js index 2234e24..eaa6768 100644 --- a/server/response.js +++ b/server/response.js @@ -2,7 +2,6 @@ const fs = require('fs') const { lookupMimeType } = require('../lib/utils') const path = require('path') - const STATUS_CODES = Object.freeze({ 200: 'OK', 201: 'Created', @@ -25,16 +24,15 @@ const STATUS_CODES = Object.freeze({ 503: 'Service Unavailable' }) - /** * Response class for handling HTTP responses. - * + * * @class Response - * + * * @param {Socket} socket - The socket object for the response. * @param {boolean} enableCors - Enable Cross-Origin Resource Sharing (CORS). * @param {string} statusTextMap - Map of status codes to status texts. - * @example + * @example * ```javascript const Response = require('./response.js'); @@ -68,7 +66,7 @@ class Response { } /** - * + * * @param {number} code - The HTTP status code. * @returns - The Response instance. */ @@ -81,7 +79,7 @@ class Response { } /** - * + * * @param {string} key - The header key. * @param {string} value - The header value. * @returns - The Response instance. @@ -113,7 +111,7 @@ class Response { } /** - * + * * @param {string} data - The data to send. * @returns - If the data is an object or array, send as JSON */ @@ -142,7 +140,7 @@ class Response { } /** - * + * * @param {number} statusCode - The HTTP status code. * Updates the status code and sends the status code as a response. */ @@ -154,7 +152,7 @@ class Response { } /** - * + * * @param {*} data - The data to send. */ json (data) { @@ -170,7 +168,7 @@ class Response { } /** - * + * * @param {*} file - The file to send. */ sendFile (file) { @@ -205,7 +203,7 @@ class Response { } /** - * + * * @param {*} file - The file to send. * @param {*} filename - The filename to send. */