From d6837fa47782061b407ca6b794dece09f1422805 Mon Sep 17 00:00:00 2001 From: Alex Pooley Date: Sat, 22 Mar 2025 23:15:10 +0000 Subject: docs: add JSDoc comment for Respond helper function --- source/index.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source') diff --git a/source/index.js b/source/index.js index a33092a..5f6340b 100644 --- a/source/index.js +++ b/source/index.js @@ -79,6 +79,12 @@ export default { }, }; +/* + Helper function to respond with a JSON object + + @param {object} body - the JSON object to respond with + @returns {Response} a new Response object +*/ function Respond(body) { return new Response(JSON.stringify(body), { headers: { -- cgit v1.2.3