aboutsummaryrefslogtreecommitdiff
path: root/source/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'source/index.js')
-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: {