aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Pooley <zuedev@gmail.com>2025-03-22 23:15:10 +0000
committerAlex Pooley <zuedev@gmail.com>2025-03-22 23:15:10 +0000
commitd6837fa47782061b407ca6b794dece09f1422805 (patch)
treecfda0b90f3ee311ef30d5e847d6f4f4f28c26042
parentc77ec36641828e0b8699b60cc21fd12f5e1a6212 (diff)
downloadzue.dev-d6837fa47782061b407ca6b794dece09f1422805.tar
zue.dev-d6837fa47782061b407ca6b794dece09f1422805.tar.gz
zue.dev-d6837fa47782061b407ca6b794dece09f1422805.tar.bz2
zue.dev-d6837fa47782061b407ca6b794dece09f1422805.tar.xz
zue.dev-d6837fa47782061b407ca6b794dece09f1422805.zip
docs: add JSDoc comment for Respond helper function
-rw-r--r--source/index.js6
1 files changed, 6 insertions, 0 deletions
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: {