diff --git a/.gitignore b/.gitignore
index 0ff7529..6a9d7bd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
backend\node_modules
+backend\.env
diff --git a/backend/index.js b/backend/index.js
index 46f56eb..811964a 100644
--- a/backend/index.js
+++ b/backend/index.js
@@ -1,4 +1,6 @@
+require("dotenv").config();
const express = require('express');
+const mongoose = require("mongoose")
const cors = require('cors');
const port = 3001;
@@ -8,9 +10,9 @@ app.use(express.json());
app.use(cors("*"));
-app.get("/test", async (req, res) => {
- res.send("Hello World!");
-});
+// app.get("/test", async (req, res) => {
+// res.send("Hello World!");
+// });
const tasks = [
{
@@ -85,4 +87,4 @@ app.post("/api/tasks/todo", async (req, res) => {
app.listen(port, () => {
console.log(`To Do App listening on port ${port}`);
-});
\ No newline at end of file
+});
diff --git a/backend/node_modules/.package-lock.json b/backend/node_modules/.package-lock.json
index b26c4bb..c3bac54 100644
--- a/backend/node_modules/.package-lock.json
+++ b/backend/node_modules/.package-lock.json
@@ -502,6 +502,15 @@
"integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
"license": "MIT"
},
+ "node_modules/kareem": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/kareem/-/kareem-3.2.0.tgz",
+ "integrity": "sha512-VS8MWZz/cT+SqBCpVfNN4zoVz5VskR3N4+sTmUXme55e9avQHntpwpNq0yjnosISXqwJ3AQVjlbI4Dyzv//JtA==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
"node_modules/math-intrinsics": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
@@ -622,6 +631,45 @@
"node": ">=20.19.0"
}
},
+ "node_modules/mongoose": {
+ "version": "9.3.3",
+ "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-9.3.3.tgz",
+ "integrity": "sha512-sfv5LOIPWeN5o/281kp4Rx9ZnuXb0g8CtvBTi7trYQs2PYYx8LWXegXxG3ar7VEns1o+d4h9LI/Dtc7dTTyYmA==",
+ "license": "MIT",
+ "dependencies": {
+ "kareem": "3.2.0",
+ "mongodb": "~7.1",
+ "mpath": "0.9.0",
+ "mquery": "6.0.0",
+ "ms": "2.1.3",
+ "sift": "17.1.3"
+ },
+ "engines": {
+ "node": ">=20.19.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/mongoose"
+ }
+ },
+ "node_modules/mpath": {
+ "version": "0.9.0",
+ "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz",
+ "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/mquery": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/mquery/-/mquery-6.0.0.tgz",
+ "integrity": "sha512-b2KQNsmgtkscfeDgkYMcWGn9vZI9YoXh802VDEwE6qc50zxBFQ0Oo8ROkawbPAsXCY1/Z1yp0MagqsZStPWJjw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=20.19.0"
+ }
+ },
"node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
@@ -904,6 +952,12 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/sift": {
+ "version": "17.1.3",
+ "resolved": "https://registry.npmjs.org/sift/-/sift-17.1.3.tgz",
+ "integrity": "sha512-Rtlj66/b0ICeFzYTuNvX/EF1igRbbnGSvEyT79McoZa/DeGhMyC5pWKOEsZKnpkqtSeovd5FL/bjHWC3CIIvCQ==",
+ "license": "MIT"
+ },
"node_modules/sparse-bitfield": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
diff --git a/backend/node_modules/kareem/.nyc_output/fa57d6c4-9e78-4624-9229-f77b87a07481.json b/backend/node_modules/kareem/.nyc_output/fa57d6c4-9e78-4624-9229-f77b87a07481.json
new file mode 100644
index 0000000..8e84c99
--- /dev/null
+++ b/backend/node_modules/kareem/.nyc_output/fa57d6c4-9e78-4624-9229-f77b87a07481.json
@@ -0,0 +1 @@
+{"/home/v/Desktop/MongoDB/kareem/index.js":{"path":"/home/v/Desktop/MongoDB/kareem/index.js","statementMap":{"0":{"start":{"line":7,"column":2},"end":{"line":7,"column":25}},"1":{"start":{"line":8,"column":2},"end":{"line":8,"column":26}},"2":{"start":{"line":11,"column":0},"end":{"line":17,"column":2}},"3":{"start":{"line":12,"column":2},"end":{"line":14,"column":3}},"4":{"start":{"line":13,"column":4},"end":{"line":13,"column":56}},"5":{"start":{"line":16,"column":2},"end":{"line":16,"column":29}},"6":{"start":{"line":19,"column":0},"end":{"line":25,"column":2}},"7":{"start":{"line":20,"column":2},"end":{"line":22,"column":3}},"8":{"start":{"line":21,"column":4},"end":{"line":21,"column":52}},"9":{"start":{"line":24,"column":2},"end":{"line":24,"column":29}},"10":{"start":{"line":34,"column":0},"end":{"line":94,"column":2}},"11":{"start":{"line":35,"column":15},"end":{"line":35,"column":41}},"12":{"start":{"line":36,"column":18},"end":{"line":36,"column":29}},"13":{"start":{"line":37,"column":16},"end":{"line":37,"column":20}},"14":{"start":{"line":38,"column":28},"end":{"line":38,"column":32}},"15":{"start":{"line":40,"column":2},"end":{"line":42,"column":3}},"16":{"start":{"line":41,"column":4},"end":{"line":41,"column":11}},"17":{"start":{"line":44,"column":27},"end":{"line":44,"column":29}},"18":{"start":{"line":45,"column":2},"end":{"line":87,"column":3}},"19":{"start":{"line":46,"column":4},"end":{"line":86,"column":5}},"20":{"start":{"line":47,"column":20},"end":{"line":47,"column":24}},"21":{"start":{"line":48,"column":19},"end":{"line":48,"column":23}},"22":{"start":{"line":49,"column":24},"end":{"line":52,"column":8}},"23":{"start":{"line":50,"column":8},"end":{"line":50,"column":27}},"24":{"start":{"line":51,"column":8},"end":{"line":51,"column":25}},"25":{"start":{"line":53,"column":19},"end":{"line":53,"column":59}},"26":{"start":{"line":53,"column":29},"end":{"line":53,"column":58}},"27":{"start":{"line":54,"column":20},"end":{"line":54,"column":40}},"28":{"start":{"line":55,"column":6},"end":{"line":60,"column":7}},"29":{"start":{"line":55,"column":19},"end":{"line":55,"column":20}},"30":{"start":{"line":56,"column":8},"end":{"line":58,"column":9}},"31":{"start":{"line":57,"column":10},"end":{"line":57,"column":19}},"32":{"start":{"line":59,"column":8},"end":{"line":59,"column":28}},"33":{"start":{"line":62,"column":6},"end":{"line":75,"column":7}},"34":{"start":{"line":63,"column":33},"end":{"line":63,"column":60}},"35":{"start":{"line":64,"column":8},"end":{"line":68,"column":9}},"36":{"start":{"line":65,"column":10},"end":{"line":65,"column":33}},"37":{"start":{"line":67,"column":10},"end":{"line":67,"column":26}},"38":{"start":{"line":70,"column":8},"end":{"line":73,"column":9}},"39":{"start":{"line":71,"column":10},"end":{"line":71,"column":38}},"40":{"start":{"line":72,"column":10},"end":{"line":72,"column":19}},"41":{"start":{"line":74,"column":8},"end":{"line":74,"column":20}},"42":{"start":{"line":77,"column":6},"end":{"line":85,"column":7}},"43":{"start":{"line":78,"column":8},"end":{"line":78,"column":35}},"44":{"start":{"line":80,"column":8},"end":{"line":83,"column":9}},"45":{"start":{"line":81,"column":10},"end":{"line":81,"column":38}},"46":{"start":{"line":82,"column":10},"end":{"line":82,"column":19}},"47":{"start":{"line":84,"column":8},"end":{"line":84,"column":20}},"48":{"start":{"line":89,"column":2},"end":{"line":89,"column":38}},"49":{"start":{"line":91,"column":2},"end":{"line":93,"column":3}},"50":{"start":{"line":92,"column":4},"end":{"line":92,"column":30}},"51":{"start":{"line":103,"column":0},"end":{"line":110,"column":2}},"52":{"start":{"line":104,"column":15},"end":{"line":104,"column":41}},"53":{"start":{"line":105,"column":18},"end":{"line":105,"column":29}},"54":{"start":{"line":107,"column":2},"end":{"line":109,"column":3}},"55":{"start":{"line":107,"column":15},"end":{"line":107,"column":16}},"56":{"start":{"line":108,"column":4},"end":{"line":108,"column":42}},"57":{"start":{"line":120,"column":0},"end":{"line":225,"column":2}},"58":{"start":{"line":121,"column":16},"end":{"line":121,"column":43}},"59":{"start":{"line":122,"column":19},"end":{"line":122,"column":31}},"60":{"start":{"line":124,"column":19},"end":{"line":124,"column":23}},"61":{"start":{"line":125,"column":2},"end":{"line":127,"column":3}},"62":{"start":{"line":126,"column":4},"end":{"line":126,"column":31}},"63":{"start":{"line":129,"column":2},"end":{"line":134,"column":3}},"64":{"start":{"line":130,"column":4},"end":{"line":132,"column":5}},"65":{"start":{"line":131,"column":6},"end":{"line":131,"column":23}},"66":{"start":{"line":133,"column":4},"end":{"line":133,"column":16}},"67":{"start":{"line":136,"column":2},"end":{"line":218,"column":3}},"68":{"start":{"line":137,"column":17},"end":{"line":137,"column":31}},"69":{"start":{"line":138,"column":18},"end":{"line":138,"column":19}},"70":{"start":{"line":139,"column":20},"end":{"line":139,"column":22}},"71":{"start":{"line":140,"column":22},"end":{"line":140,"column":33}},"72":{"start":{"line":141,"column":4},"end":{"line":146,"column":5}},"73":{"start":{"line":141,"column":17},"end":{"line":141,"column":18}},"74":{"start":{"line":142,"column":6},"end":{"line":145,"column":7}},"75":{"start":{"line":143,"column":8},"end":{"line":143,"column":21}},"76":{"start":{"line":144,"column":8},"end":{"line":144,"column":30}},"77":{"start":{"line":148,"column":4},"end":{"line":153,"column":5}},"78":{"start":{"line":149,"column":6},"end":{"line":149,"column":42}},"79":{"start":{"line":150,"column":6},"end":{"line":152,"column":7}},"80":{"start":{"line":150,"column":19},"end":{"line":150,"column":33}},"81":{"start":{"line":151,"column":8},"end":{"line":151,"column":27}},"82":{"start":{"line":157,"column":22},"end":{"line":160,"column":6}},"83":{"start":{"line":158,"column":6},"end":{"line":158,"column":25}},"84":{"start":{"line":159,"column":6},"end":{"line":159,"column":23}},"85":{"start":{"line":161,"column":4},"end":{"line":167,"column":7}},"86":{"start":{"line":162,"column":6},"end":{"line":166,"column":7}},"87":{"start":{"line":163,"column":8},"end":{"line":163,"column":20}},"88":{"start":{"line":165,"column":8},"end":{"line":165,"column":18}},"89":{"start":{"line":169,"column":4},"end":{"line":217,"column":5}},"90":{"start":{"line":170,"column":6},"end":{"line":188,"column":7}},"91":{"start":{"line":171,"column":8},"end":{"line":185,"column":9}},"92":{"start":{"line":172,"column":22},"end":{"line":172,"column":71}},"93":{"start":{"line":173,"column":10},"end":{"line":178,"column":11}},"94":{"start":{"line":174,"column":12},"end":{"line":174,"column":22}},"95":{"start":{"line":175,"column":17},"end":{"line":178,"column":11}},"96":{"start":{"line":177,"column":12},"end":{"line":177,"column":28}},"97":{"start":{"line":180,"column":10},"end":{"line":183,"column":11}},"98":{"start":{"line":181,"column":12},"end":{"line":181,"column":30}},"99":{"start":{"line":182,"column":12},"end":{"line":182,"column":21}},"100":{"start":{"line":184,"column":10},"end":{"line":184,"column":29}},"101":{"start":{"line":187,"column":8},"end":{"line":187,"column":17}},"102":{"start":{"line":190,"column":6},"end":{"line":216,"column":7}},"103":{"start":{"line":192,"column":8},"end":{"line":192,"column":17}},"104":{"start":{"line":194,"column":18},"end":{"line":194,"column":22}},"105":{"start":{"line":195,"column":8},"end":{"line":210,"column":9}},"106":{"start":{"line":196,"column":10},"end":{"line":196,"column":45}},"107":{"start":{"line":197,"column":10},"end":{"line":202,"column":11}},"108":{"start":{"line":198,"column":12},"end":{"line":198,"column":28}},"109":{"start":{"line":199,"column":17},"end":{"line":202,"column":11}},"110":{"start":{"line":201,"column":12},"end":{"line":201,"column":34}},"111":{"start":{"line":204,"column":10},"end":{"line":207,"column":11}},"112":{"start":{"line":205,"column":12},"end":{"line":205,"column":30}},"113":{"start":{"line":206,"column":12},"end":{"line":206,"column":21}},"114":{"start":{"line":208,"column":10},"end":{"line":208,"column":29}},"115":{"start":{"line":209,"column":10},"end":{"line":209,"column":19}},"116":{"start":{"line":212,"column":8},"end":{"line":215,"column":9}},"117":{"start":{"line":213,"column":10},"end":{"line":213,"column":26}},"118":{"start":{"line":214,"column":10},"end":{"line":214,"column":19}},"119":{"start":{"line":220,"column":2},"end":{"line":222,"column":3}},"120":{"start":{"line":221,"column":4},"end":{"line":221,"column":21}},"121":{"start":{"line":224,"column":2},"end":{"line":224,"column":14}},"122":{"start":{"line":234,"column":0},"end":{"line":246,"column":2}},"123":{"start":{"line":235,"column":16},"end":{"line":235,"column":43}},"124":{"start":{"line":236,"column":19},"end":{"line":236,"column":31}},"125":{"start":{"line":238,"column":2},"end":{"line":243,"column":3}},"126":{"start":{"line":238,"column":15},"end":{"line":238,"column":16}},"127":{"start":{"line":239,"column":16},"end":{"line":239,"column":54}},"128":{"start":{"line":240,"column":4},"end":{"line":242,"column":5}},"129":{"start":{"line":241,"column":6},"end":{"line":241,"column":22}},"130":{"start":{"line":245,"column":2},"end":{"line":245,"column":14}},"131":{"start":{"line":254,"column":0},"end":{"line":265,"column":2}},"132":{"start":{"line":255,"column":16},"end":{"line":255,"column":20}},"133":{"start":{"line":256,"column":2},"end":{"line":264,"column":4}},"134":{"start":{"line":257,"column":4},"end":{"line":257,"column":45}},"135":{"start":{"line":259,"column":21},"end":{"line":259,"column":46}},"136":{"start":{"line":261,"column":19},"end":{"line":261,"column":61}},"137":{"start":{"line":263,"column":4},"end":{"line":263,"column":21}},"138":{"start":{"line":276,"column":0},"end":{"line":297,"column":2}},"139":{"start":{"line":278,"column":28},"end":{"line":278,"column":33}},"140":{"start":{"line":279,"column":2},"end":{"line":288,"column":3}},"141":{"start":{"line":280,"column":4},"end":{"line":280,"column":44}},"142":{"start":{"line":282,"column":4},"end":{"line":287,"column":5}},"143":{"start":{"line":283,"column":6},"end":{"line":283,"column":23}},"144":{"start":{"line":284,"column":6},"end":{"line":284,"column":33}},"145":{"start":{"line":286,"column":6},"end":{"line":286,"column":70}},"146":{"start":{"line":290,"column":2},"end":{"line":292,"column":3}},"147":{"start":{"line":291,"column":4},"end":{"line":291,"column":40}},"148":{"start":{"line":294,"column":2},"end":{"line":294,"column":59}},"149":{"start":{"line":296,"column":2},"end":{"line":296,"column":16}},"150":{"start":{"line":304,"column":0},"end":{"line":336,"column":2}},"151":{"start":{"line":305,"column":16},"end":{"line":305,"column":28}},"152":{"start":{"line":307,"column":15},"end":{"line":307,"column":45}},"153":{"start":{"line":308,"column":2},"end":{"line":319,"column":3}},"154":{"start":{"line":309,"column":18},"end":{"line":311,"column":16}},"155":{"start":{"line":310,"column":15},"end":{"line":310,"column":51}},"156":{"start":{"line":313,"column":4},"end":{"line":316,"column":5}},"157":{"start":{"line":314,"column":6},"end":{"line":314,"column":31}},"158":{"start":{"line":315,"column":6},"end":{"line":315,"column":15}},"159":{"start":{"line":318,"column":4},"end":{"line":318,"column":33}},"160":{"start":{"line":321,"column":16},"end":{"line":321,"column":47}},"161":{"start":{"line":322,"column":2},"end":{"line":333,"column":3}},"162":{"start":{"line":323,"column":18},"end":{"line":325,"column":16}},"163":{"start":{"line":324,"column":15},"end":{"line":324,"column":51}},"164":{"start":{"line":327,"column":4},"end":{"line":330,"column":5}},"165":{"start":{"line":328,"column":6},"end":{"line":328,"column":32}},"166":{"start":{"line":329,"column":6},"end":{"line":329,"column":15}},"167":{"start":{"line":332,"column":4},"end":{"line":332,"column":34}},"168":{"start":{"line":335,"column":2},"end":{"line":335,"column":15}},"169":{"start":{"line":343,"column":0},"end":{"line":345,"column":2}},"170":{"start":{"line":344,"column":2},"end":{"line":344,"column":55}},"171":{"start":{"line":355,"column":0},"end":{"line":365,"column":2}},"172":{"start":{"line":356,"column":16},"end":{"line":356,"column":20}},"173":{"start":{"line":357,"column":2},"end":{"line":360,"column":3}},"174":{"start":{"line":359,"column":4},"end":{"line":359,"column":14}},"175":{"start":{"line":361,"column":2},"end":{"line":364,"column":4}},"176":{"start":{"line":362,"column":21},"end":{"line":362,"column":36}},"177":{"start":{"line":363,"column":4},"end":{"line":363,"column":74}},"178":{"start":{"line":376,"column":0},"end":{"line":398,"column":2}},"179":{"start":{"line":377,"column":2},"end":{"line":382,"column":3}},"180":{"start":{"line":378,"column":4},"end":{"line":378,"column":17}},"181":{"start":{"line":379,"column":4},"end":{"line":379,"column":17}},"182":{"start":{"line":380,"column":9},"end":{"line":382,"column":3}},"183":{"start":{"line":381,"column":4},"end":{"line":381,"column":17}},"184":{"start":{"line":384,"column":15},"end":{"line":384,"column":41}},"185":{"start":{"line":385,"column":2},"end":{"line":385,"column":29}},"186":{"start":{"line":387,"column":2},"end":{"line":389,"column":3}},"187":{"start":{"line":388,"column":4},"end":{"line":388,"column":74}},"188":{"start":{"line":391,"column":2},"end":{"line":395,"column":3}},"189":{"start":{"line":392,"column":4},"end":{"line":392,"column":57}},"190":{"start":{"line":394,"column":4},"end":{"line":394,"column":54}},"191":{"start":{"line":397,"column":2},"end":{"line":397,"column":14}},"192":{"start":{"line":409,"column":0},"end":{"line":429,"column":2}},"193":{"start":{"line":410,"column":16},"end":{"line":410,"column":43}},"194":{"start":{"line":412,"column":2},"end":{"line":416,"column":3}},"195":{"start":{"line":413,"column":4},"end":{"line":413,"column":19}},"196":{"start":{"line":414,"column":4},"end":{"line":414,"column":17}},"197":{"start":{"line":415,"column":4},"end":{"line":415,"column":17}},"198":{"start":{"line":418,"column":2},"end":{"line":420,"column":3}},"199":{"start":{"line":419,"column":4},"end":{"line":419,"column":75}},"200":{"start":{"line":422,"column":2},"end":{"line":426,"column":3}},"201":{"start":{"line":423,"column":4},"end":{"line":423,"column":58}},"202":{"start":{"line":425,"column":4},"end":{"line":425,"column":55}},"203":{"start":{"line":427,"column":2},"end":{"line":427,"column":31}},"204":{"start":{"line":428,"column":2},"end":{"line":428,"column":14}},"205":{"start":{"line":440,"column":0},"end":{"line":447,"column":2}},"206":{"start":{"line":441,"column":2},"end":{"line":445,"column":3}},"207":{"start":{"line":442,"column":4},"end":{"line":442,"column":19}},"208":{"start":{"line":443,"column":4},"end":{"line":443,"column":17}},"209":{"start":{"line":444,"column":4},"end":{"line":444,"column":17}},"210":{"start":{"line":446,"column":2},"end":{"line":446,"column":74}},"211":{"start":{"line":453,"column":0},"end":{"line":465,"column":2}},"212":{"start":{"line":454,"column":12},"end":{"line":454,"column":24}},"213":{"start":{"line":456,"column":2},"end":{"line":459,"column":3}},"214":{"start":{"line":457,"column":18},"end":{"line":457,"column":45}},"215":{"start":{"line":458,"column":4},"end":{"line":458,"column":28}},"216":{"start":{"line":460,"column":2},"end":{"line":462,"column":3}},"217":{"start":{"line":461,"column":4},"end":{"line":461,"column":52}},"218":{"start":{"line":464,"column":2},"end":{"line":464,"column":11}},"219":{"start":{"line":473,"column":0},"end":{"line":493,"column":2}},"220":{"start":{"line":474,"column":2},"end":{"line":474,"column":48}},"221":{"start":{"line":475,"column":14},"end":{"line":475,"column":41}},"222":{"start":{"line":477,"column":2},"end":{"line":484,"column":3}},"223":{"start":{"line":478,"column":23},"end":{"line":478,"column":47}},"224":{"start":{"line":479,"column":25},"end":{"line":481,"column":67}},"225":{"start":{"line":481,"column":18},"end":{"line":481,"column":66}},"226":{"start":{"line":481,"column":39},"end":{"line":481,"column":44}},"227":{"start":{"line":482,"column":21},"end":{"line":482,"column":52}},"228":{"start":{"line":483,"column":4},"end":{"line":483,"column":33}},"229":{"start":{"line":485,"column":2},"end":{"line":490,"column":3}},"230":{"start":{"line":486,"column":24},"end":{"line":486,"column":49}},"231":{"start":{"line":487,"column":25},"end":{"line":488,"column":48}},"232":{"start":{"line":488,"column":18},"end":{"line":488,"column":47}},"233":{"start":{"line":489,"column":4},"end":{"line":489,"column":58}},"234":{"start":{"line":492,"column":2},"end":{"line":492,"column":13}},"235":{"start":{"line":496,"column":2},"end":{"line":496,"column":79}},"236":{"start":{"line":500,"column":2},"end":{"line":502,"column":3}},"237":{"start":{"line":501,"column":4},"end":{"line":501,"column":16}},"238":{"start":{"line":503,"column":2},"end":{"line":503,"column":40}},"239":{"start":{"line":506,"column":0},"end":{"line":506,"column":24}}},"fnMap":{"0":{"name":"Kareem","decl":{"start":{"line":6,"column":9},"end":{"line":6,"column":15}},"loc":{"start":{"line":6,"column":18},"end":{"line":9,"column":1}},"line":6},"1":{"name":"skipWrappedFunction","decl":{"start":{"line":11,"column":38},"end":{"line":11,"column":57}},"loc":{"start":{"line":11,"column":60},"end":{"line":17,"column":1}},"line":11},"2":{"name":"overwriteResult","decl":{"start":{"line":19,"column":34},"end":{"line":19,"column":49}},"loc":{"start":{"line":19,"column":52},"end":{"line":25,"column":1}},"line":19},"3":{"name":"execPre","decl":{"start":{"line":34,"column":42},"end":{"line":34,"column":49}},"loc":{"start":{"line":34,"column":71},"end":{"line":94,"column":1}},"line":34},"4":{"name":"(anonymous_4)","decl":{"start":{"line":49,"column":36},"end":{"line":49,"column":37}},"loc":{"start":{"line":49,"column":59},"end":{"line":52,"column":7}},"line":49},"5":{"name":"(anonymous_5)","decl":{"start":{"line":53,"column":20},"end":{"line":53,"column":21}},"loc":{"start":{"line":53,"column":29},"end":{"line":53,"column":58}},"line":53},"6":{"name":"(anonymous_6)","decl":{"start":{"line":103,"column":31},"end":{"line":103,"column":32}},"loc":{"start":{"line":103,"column":61},"end":{"line":110,"column":1}},"line":103},"7":{"name":"execPost","decl":{"start":{"line":120,"column":43},"end":{"line":120,"column":51}},"loc":{"start":{"line":120,"column":82},"end":{"line":225,"column":1}},"line":120},"8":{"name":"(anonymous_8)","decl":{"start":{"line":157,"column":34},"end":{"line":157,"column":35}},"loc":{"start":{"line":157,"column":57},"end":{"line":160,"column":5}},"line":157},"9":{"name":"nextCallback","decl":{"start":{"line":161,"column":26},"end":{"line":161,"column":38}},"loc":{"start":{"line":161,"column":44},"end":{"line":167,"column":5}},"line":161},"10":{"name":"(anonymous_10)","decl":{"start":{"line":234,"column":32},"end":{"line":234,"column":33}},"loc":{"start":{"line":234,"column":62},"end":{"line":246,"column":1}},"line":234},"11":{"name":"(anonymous_11)","decl":{"start":{"line":254,"column":37},"end":{"line":254,"column":38}},"loc":{"start":{"line":254,"column":56},"end":{"line":265,"column":1}},"line":254},"12":{"name":"syncWrapper","decl":{"start":{"line":256,"column":18},"end":{"line":256,"column":29}},"loc":{"start":{"line":256,"column":32},"end":{"line":264,"column":3}},"line":256},"13":{"name":"wrap","decl":{"start":{"line":276,"column":39},"end":{"line":276,"column":43}},"loc":{"start":{"line":276,"column":78},"end":{"line":297,"column":1}},"line":276},"14":{"name":"(anonymous_14)","decl":{"start":{"line":304,"column":26},"end":{"line":304,"column":27}},"loc":{"start":{"line":304,"column":39},"end":{"line":336,"column":1}},"line":304},"15":{"name":"(anonymous_15)","decl":{"start":{"line":310,"column":10},"end":{"line":310,"column":11}},"loc":{"start":{"line":310,"column":15},"end":{"line":310,"column":51}},"line":310},"16":{"name":"(anonymous_16)","decl":{"start":{"line":324,"column":10},"end":{"line":324,"column":11}},"loc":{"start":{"line":324,"column":15},"end":{"line":324,"column":51}},"line":324},"17":{"name":"(anonymous_17)","decl":{"start":{"line":343,"column":28},"end":{"line":343,"column":29}},"loc":{"start":{"line":343,"column":43},"end":{"line":345,"column":1}},"line":343},"18":{"name":"(anonymous_18)","decl":{"start":{"line":355,"column":33},"end":{"line":355,"column":34}},"loc":{"start":{"line":355,"column":70},"end":{"line":365,"column":1}},"line":355},"19":{"name":"kareemWrappedFunction","decl":{"start":{"line":361,"column":18},"end":{"line":361,"column":39}},"loc":{"start":{"line":361,"column":42},"end":{"line":364,"column":3}},"line":361},"20":{"name":"(anonymous_20)","decl":{"start":{"line":376,"column":23},"end":{"line":376,"column":24}},"loc":{"start":{"line":376,"column":67},"end":{"line":398,"column":1}},"line":376},"21":{"name":"(anonymous_21)","decl":{"start":{"line":409,"column":24},"end":{"line":409,"column":25}},"loc":{"start":{"line":409,"column":61},"end":{"line":429,"column":1}},"line":409},"22":{"name":"postError","decl":{"start":{"line":440,"column":38},"end":{"line":440,"column":47}},"loc":{"start":{"line":440,"column":76},"end":{"line":447,"column":1}},"line":440},"23":{"name":"(anonymous_23)","decl":{"start":{"line":453,"column":25},"end":{"line":453,"column":26}},"loc":{"start":{"line":453,"column":36},"end":{"line":465,"column":1}},"line":453},"24":{"name":"(anonymous_24)","decl":{"start":{"line":473,"column":25},"end":{"line":473,"column":26}},"loc":{"start":{"line":473,"column":48},"end":{"line":493,"column":1}},"line":473},"25":{"name":"(anonymous_25)","decl":{"start":{"line":481,"column":13},"end":{"line":481,"column":14}},"loc":{"start":{"line":481,"column":18},"end":{"line":481,"column":66}},"line":481},"26":{"name":"(anonymous_26)","decl":{"start":{"line":481,"column":33},"end":{"line":481,"column":34}},"loc":{"start":{"line":481,"column":39},"end":{"line":481,"column":44}},"line":481},"27":{"name":"(anonymous_27)","decl":{"start":{"line":488,"column":13},"end":{"line":488,"column":14}},"loc":{"start":{"line":488,"column":18},"end":{"line":488,"column":47}},"line":488},"28":{"name":"isPromiseLike","decl":{"start":{"line":495,"column":9},"end":{"line":495,"column":22}},"loc":{"start":{"line":495,"column":26},"end":{"line":497,"column":1}},"line":495},"29":{"name":"isErrorHandlingMiddleware","decl":{"start":{"line":499,"column":9},"end":{"line":499,"column":34}},"loc":{"start":{"line":499,"column":50},"end":{"line":504,"column":1}},"line":499}},"branchMap":{"0":{"loc":{"start":{"line":12,"column":2},"end":{"line":14,"column":3}},"type":"if","locations":[{"start":{"line":12,"column":2},"end":{"line":14,"column":3}},{"start":{"line":12,"column":2},"end":{"line":14,"column":3}}],"line":12},"1":{"loc":{"start":{"line":20,"column":2},"end":{"line":22,"column":3}},"type":"if","locations":[{"start":{"line":20,"column":2},"end":{"line":22,"column":3}},{"start":{"line":20,"column":2},"end":{"line":22,"column":3}}],"line":20},"2":{"loc":{"start":{"line":35,"column":15},"end":{"line":35,"column":41}},"type":"binary-expr","locations":[{"start":{"line":35,"column":15},"end":{"line":35,"column":35}},{"start":{"line":35,"column":39},"end":{"line":35,"column":41}}],"line":35},"3":{"loc":{"start":{"line":40,"column":2},"end":{"line":42,"column":3}},"type":"if","locations":[{"start":{"line":40,"column":2},"end":{"line":42,"column":3}},{"start":{"line":40,"column":2},"end":{"line":42,"column":3}}],"line":40},"4":{"loc":{"start":{"line":46,"column":4},"end":{"line":86,"column":5}},"type":"if","locations":[{"start":{"line":46,"column":4},"end":{"line":86,"column":5}},{"start":{"line":46,"column":4},"end":{"line":86,"column":5}}],"line":46},"5":{"loc":{"start":{"line":53,"column":29},"end":{"line":53,"column":58}},"type":"cond-expr","locations":[{"start":{"line":53,"column":35},"end":{"line":53,"column":46}},{"start":{"line":53,"column":49},"end":{"line":53,"column":58}}],"line":53},"6":{"loc":{"start":{"line":56,"column":8},"end":{"line":58,"column":9}},"type":"if","locations":[{"start":{"line":56,"column":8},"end":{"line":58,"column":9}},{"start":{"line":56,"column":8},"end":{"line":58,"column":9}}],"line":56},"7":{"loc":{"start":{"line":56,"column":12},"end":{"line":56,"column":68}},"type":"binary-expr","locations":[{"start":{"line":56,"column":12},"end":{"line":56,"column":34}},{"start":{"line":56,"column":38},"end":{"line":56,"column":68}}],"line":56},"8":{"loc":{"start":{"line":64,"column":8},"end":{"line":68,"column":9}},"type":"if","locations":[{"start":{"line":64,"column":8},"end":{"line":68,"column":9}},{"start":{"line":64,"column":8},"end":{"line":68,"column":9}}],"line":64},"9":{"loc":{"start":{"line":70,"column":8},"end":{"line":73,"column":9}},"type":"if","locations":[{"start":{"line":70,"column":8},"end":{"line":73,"column":9}},{"start":{"line":70,"column":8},"end":{"line":73,"column":9}}],"line":70},"10":{"loc":{"start":{"line":80,"column":8},"end":{"line":83,"column":9}},"type":"if","locations":[{"start":{"line":80,"column":8},"end":{"line":83,"column":9}},{"start":{"line":80,"column":8},"end":{"line":83,"column":9}}],"line":80},"11":{"loc":{"start":{"line":91,"column":2},"end":{"line":93,"column":3}},"type":"if","locations":[{"start":{"line":91,"column":2},"end":{"line":93,"column":3}},{"start":{"line":91,"column":2},"end":{"line":93,"column":3}}],"line":91},"12":{"loc":{"start":{"line":104,"column":15},"end":{"line":104,"column":41}},"type":"binary-expr","locations":[{"start":{"line":104,"column":15},"end":{"line":104,"column":35}},{"start":{"line":104,"column":39},"end":{"line":104,"column":41}}],"line":104},"13":{"loc":{"start":{"line":108,"column":30},"end":{"line":108,"column":40}},"type":"binary-expr","locations":[{"start":{"line":108,"column":30},"end":{"line":108,"column":34}},{"start":{"line":108,"column":38},"end":{"line":108,"column":40}}],"line":108},"14":{"loc":{"start":{"line":121,"column":16},"end":{"line":121,"column":43}},"type":"binary-expr","locations":[{"start":{"line":121,"column":16},"end":{"line":121,"column":37}},{"start":{"line":121,"column":41},"end":{"line":121,"column":43}}],"line":121},"15":{"loc":{"start":{"line":125,"column":2},"end":{"line":127,"column":3}},"type":"if","locations":[{"start":{"line":125,"column":2},"end":{"line":127,"column":3}},{"start":{"line":125,"column":2},"end":{"line":127,"column":3}}],"line":125},"16":{"loc":{"start":{"line":125,"column":6},"end":{"line":125,"column":30}},"type":"binary-expr","locations":[{"start":{"line":125,"column":6},"end":{"line":125,"column":13}},{"start":{"line":125,"column":17},"end":{"line":125,"column":30}}],"line":125},"17":{"loc":{"start":{"line":129,"column":2},"end":{"line":134,"column":3}},"type":"if","locations":[{"start":{"line":129,"column":2},"end":{"line":134,"column":3}},{"start":{"line":129,"column":2},"end":{"line":134,"column":3}}],"line":129},"18":{"loc":{"start":{"line":130,"column":4},"end":{"line":132,"column":5}},"type":"if","locations":[{"start":{"line":130,"column":4},"end":{"line":132,"column":5}},{"start":{"line":130,"column":4},"end":{"line":132,"column":5}}],"line":130},"19":{"loc":{"start":{"line":142,"column":6},"end":{"line":145,"column":7}},"type":"if","locations":[{"start":{"line":142,"column":6},"end":{"line":145,"column":7}},{"start":{"line":142,"column":6},"end":{"line":145,"column":7}}],"line":142},"20":{"loc":{"start":{"line":142,"column":10},"end":{"line":142,"column":44}},"type":"binary-expr","locations":[{"start":{"line":142,"column":10},"end":{"line":142,"column":18}},{"start":{"line":142,"column":22},"end":{"line":142,"column":44}}],"line":142},"21":{"loc":{"start":{"line":148,"column":4},"end":{"line":153,"column":5}},"type":"if","locations":[{"start":{"line":148,"column":4},"end":{"line":153,"column":5}},{"start":{"line":148,"column":4},"end":{"line":153,"column":5}}],"line":148},"22":{"loc":{"start":{"line":162,"column":6},"end":{"line":166,"column":7}},"type":"if","locations":[{"start":{"line":162,"column":6},"end":{"line":166,"column":7}},{"start":{"line":162,"column":6},"end":{"line":166,"column":7}}],"line":162},"23":{"loc":{"start":{"line":169,"column":4},"end":{"line":217,"column":5}},"type":"if","locations":[{"start":{"line":169,"column":4},"end":{"line":217,"column":5}},{"start":{"line":169,"column":4},"end":{"line":217,"column":5}}],"line":169},"24":{"loc":{"start":{"line":170,"column":6},"end":{"line":188,"column":7}},"type":"if","locations":[{"start":{"line":170,"column":6},"end":{"line":188,"column":7}},{"start":{"line":170,"column":6},"end":{"line":188,"column":7}}],"line":170},"25":{"loc":{"start":{"line":173,"column":10},"end":{"line":178,"column":11}},"type":"if","locations":[{"start":{"line":173,"column":10},"end":{"line":178,"column":11}},{"start":{"line":173,"column":10},"end":{"line":178,"column":11}}],"line":173},"26":{"loc":{"start":{"line":175,"column":17},"end":{"line":178,"column":11}},"type":"if","locations":[{"start":{"line":175,"column":17},"end":{"line":178,"column":11}},{"start":{"line":175,"column":17},"end":{"line":178,"column":11}}],"line":175},"27":{"loc":{"start":{"line":180,"column":10},"end":{"line":183,"column":11}},"type":"if","locations":[{"start":{"line":180,"column":10},"end":{"line":183,"column":11}},{"start":{"line":180,"column":10},"end":{"line":183,"column":11}}],"line":180},"28":{"loc":{"start":{"line":190,"column":6},"end":{"line":216,"column":7}},"type":"if","locations":[{"start":{"line":190,"column":6},"end":{"line":216,"column":7}},{"start":{"line":190,"column":6},"end":{"line":216,"column":7}}],"line":190},"29":{"loc":{"start":{"line":197,"column":10},"end":{"line":202,"column":11}},"type":"if","locations":[{"start":{"line":197,"column":10},"end":{"line":202,"column":11}},{"start":{"line":197,"column":10},"end":{"line":202,"column":11}}],"line":197},"30":{"loc":{"start":{"line":199,"column":17},"end":{"line":202,"column":11}},"type":"if","locations":[{"start":{"line":199,"column":17},"end":{"line":202,"column":11}},{"start":{"line":199,"column":17},"end":{"line":202,"column":11}}],"line":199},"31":{"loc":{"start":{"line":204,"column":10},"end":{"line":207,"column":11}},"type":"if","locations":[{"start":{"line":204,"column":10},"end":{"line":207,"column":11}},{"start":{"line":204,"column":10},"end":{"line":207,"column":11}}],"line":204},"32":{"loc":{"start":{"line":212,"column":8},"end":{"line":215,"column":9}},"type":"if","locations":[{"start":{"line":212,"column":8},"end":{"line":215,"column":9}},{"start":{"line":212,"column":8},"end":{"line":215,"column":9}}],"line":212},"33":{"loc":{"start":{"line":220,"column":2},"end":{"line":222,"column":3}},"type":"if","locations":[{"start":{"line":220,"column":2},"end":{"line":222,"column":3}},{"start":{"line":220,"column":2},"end":{"line":222,"column":3}}],"line":220},"34":{"loc":{"start":{"line":235,"column":16},"end":{"line":235,"column":43}},"type":"binary-expr","locations":[{"start":{"line":235,"column":16},"end":{"line":235,"column":37}},{"start":{"line":235,"column":41},"end":{"line":235,"column":43}}],"line":235},"35":{"loc":{"start":{"line":239,"column":43},"end":{"line":239,"column":53}},"type":"binary-expr","locations":[{"start":{"line":239,"column":43},"end":{"line":239,"column":47}},{"start":{"line":239,"column":51},"end":{"line":239,"column":53}}],"line":239},"36":{"loc":{"start":{"line":240,"column":4},"end":{"line":242,"column":5}},"type":"if","locations":[{"start":{"line":240,"column":4},"end":{"line":242,"column":5}},{"start":{"line":240,"column":4},"end":{"line":242,"column":5}}],"line":240},"37":{"loc":{"start":{"line":282,"column":4},"end":{"line":287,"column":5}},"type":"if","locations":[{"start":{"line":282,"column":4},"end":{"line":287,"column":5}},{"start":{"line":282,"column":4},"end":{"line":287,"column":5}}],"line":282},"38":{"loc":{"start":{"line":290,"column":2},"end":{"line":292,"column":3}},"type":"if","locations":[{"start":{"line":290,"column":2},"end":{"line":292,"column":3}},{"start":{"line":290,"column":2},"end":{"line":292,"column":3}}],"line":290},"39":{"loc":{"start":{"line":313,"column":4},"end":{"line":316,"column":5}},"type":"if","locations":[{"start":{"line":313,"column":4},"end":{"line":316,"column":5}},{"start":{"line":313,"column":4},"end":{"line":316,"column":5}}],"line":313},"40":{"loc":{"start":{"line":327,"column":4},"end":{"line":330,"column":5}},"type":"if","locations":[{"start":{"line":327,"column":4},"end":{"line":330,"column":5}},{"start":{"line":327,"column":4},"end":{"line":330,"column":5}}],"line":327},"41":{"loc":{"start":{"line":344,"column":9},"end":{"line":344,"column":54}},"type":"binary-expr","locations":[{"start":{"line":344,"column":9},"end":{"line":344,"column":29}},{"start":{"line":344,"column":33},"end":{"line":344,"column":54}}],"line":344},"42":{"loc":{"start":{"line":357,"column":2},"end":{"line":360,"column":3}},"type":"if","locations":[{"start":{"line":357,"column":2},"end":{"line":360,"column":3}},{"start":{"line":357,"column":2},"end":{"line":360,"column":3}}],"line":357},"43":{"loc":{"start":{"line":362,"column":21},"end":{"line":362,"column":36}},"type":"binary-expr","locations":[{"start":{"line":362,"column":21},"end":{"line":362,"column":28}},{"start":{"line":362,"column":32},"end":{"line":362,"column":36}}],"line":362},"44":{"loc":{"start":{"line":377,"column":2},"end":{"line":382,"column":3}},"type":"if","locations":[{"start":{"line":377,"column":2},"end":{"line":382,"column":3}},{"start":{"line":377,"column":2},"end":{"line":382,"column":3}}],"line":377},"45":{"loc":{"start":{"line":380,"column":9},"end":{"line":382,"column":3}},"type":"if","locations":[{"start":{"line":380,"column":9},"end":{"line":382,"column":3}},{"start":{"line":380,"column":9},"end":{"line":382,"column":3}}],"line":380},"46":{"loc":{"start":{"line":384,"column":15},"end":{"line":384,"column":41}},"type":"binary-expr","locations":[{"start":{"line":384,"column":15},"end":{"line":384,"column":35}},{"start":{"line":384,"column":39},"end":{"line":384,"column":41}}],"line":384},"47":{"loc":{"start":{"line":387,"column":2},"end":{"line":389,"column":3}},"type":"if","locations":[{"start":{"line":387,"column":2},"end":{"line":389,"column":3}},{"start":{"line":387,"column":2},"end":{"line":389,"column":3}}],"line":387},"48":{"loc":{"start":{"line":391,"column":2},"end":{"line":395,"column":3}},"type":"if","locations":[{"start":{"line":391,"column":2},"end":{"line":395,"column":3}},{"start":{"line":391,"column":2},"end":{"line":395,"column":3}}],"line":391},"49":{"loc":{"start":{"line":410,"column":16},"end":{"line":410,"column":43}},"type":"binary-expr","locations":[{"start":{"line":410,"column":16},"end":{"line":410,"column":37}},{"start":{"line":410,"column":41},"end":{"line":410,"column":43}}],"line":410},"50":{"loc":{"start":{"line":412,"column":2},"end":{"line":416,"column":3}},"type":"if","locations":[{"start":{"line":412,"column":2},"end":{"line":416,"column":3}},{"start":{"line":412,"column":2},"end":{"line":416,"column":3}}],"line":412},"51":{"loc":{"start":{"line":418,"column":2},"end":{"line":420,"column":3}},"type":"if","locations":[{"start":{"line":418,"column":2},"end":{"line":420,"column":3}},{"start":{"line":418,"column":2},"end":{"line":420,"column":3}}],"line":418},"52":{"loc":{"start":{"line":422,"column":2},"end":{"line":426,"column":3}},"type":"if","locations":[{"start":{"line":422,"column":2},"end":{"line":426,"column":3}},{"start":{"line":422,"column":2},"end":{"line":426,"column":3}}],"line":422},"53":{"loc":{"start":{"line":441,"column":2},"end":{"line":445,"column":3}},"type":"if","locations":[{"start":{"line":441,"column":2},"end":{"line":445,"column":3}},{"start":{"line":441,"column":2},"end":{"line":445,"column":3}}],"line":441},"54":{"loc":{"start":{"line":474,"column":10},"end":{"line":474,"column":47}},"type":"cond-expr","locations":[{"start":{"line":474,"column":35},"end":{"line":474,"column":39}},{"start":{"line":474,"column":42},"end":{"line":474,"column":47}}],"line":474},"55":{"loc":{"start":{"line":475,"column":14},"end":{"line":475,"column":41}},"type":"cond-expr","locations":[{"start":{"line":475,"column":22},"end":{"line":475,"column":34}},{"start":{"line":475,"column":37},"end":{"line":475,"column":41}}],"line":475},"56":{"loc":{"start":{"line":478,"column":23},"end":{"line":478,"column":47}},"type":"binary-expr","locations":[{"start":{"line":478,"column":23},"end":{"line":478,"column":41}},{"start":{"line":478,"column":45},"end":{"line":478,"column":47}}],"line":478},"57":{"loc":{"start":{"line":486,"column":24},"end":{"line":486,"column":49}},"type":"binary-expr","locations":[{"start":{"line":486,"column":24},"end":{"line":486,"column":43}},{"start":{"line":486,"column":47},"end":{"line":486,"column":49}}],"line":486},"58":{"loc":{"start":{"line":496,"column":10},"end":{"line":496,"column":77}},"type":"binary-expr","locations":[{"start":{"line":496,"column":10},"end":{"line":496,"column":31}},{"start":{"line":496,"column":35},"end":{"line":496,"column":45}},{"start":{"line":496,"column":49},"end":{"line":496,"column":77}}],"line":496},"59":{"loc":{"start":{"line":500,"column":2},"end":{"line":502,"column":3}},"type":"if","locations":[{"start":{"line":500,"column":2},"end":{"line":502,"column":3}},{"start":{"line":500,"column":2},"end":{"line":502,"column":3}}],"line":500}},"s":{"0":62,"1":62,"2":1,"3":6,"4":3,"5":3,"6":1,"7":12,"8":6,"9":6,"10":1,"11":27,"12":27,"13":27,"14":27,"15":27,"16":3,"17":24,"18":24,"19":33,"20":27,"21":27,"22":27,"23":27,"24":27,"25":27,"26":27,"27":27,"28":27,"29":27,"30":19,"31":0,"32":19,"33":27,"34":27,"35":27,"36":0,"37":27,"38":9,"39":3,"40":3,"41":6,"42":6,"43":6,"44":2,"45":0,"46":0,"47":2,"48":16,"49":16,"50":3,"51":1,"52":4,"53":4,"54":4,"55":4,"56":4,"57":1,"58":27,"59":27,"60":27,"61":27,"62":6,"63":27,"64":1,"65":0,"66":1,"67":26,"68":41,"69":41,"70":41,"71":41,"72":41,"73":41,"74":40,"75":40,"76":40,"77":41,"78":1,"79":1,"80":1,"81":1,"82":41,"83":41,"84":41,"85":41,"86":24,"87":12,"88":12,"89":41,"90":14,"91":8,"92":8,"93":8,"94":1,"95":7,"96":6,"97":5,"98":0,"99":0,"100":5,"101":6,"102":27,"103":1,"104":26,"105":26,"106":26,"107":26,"108":3,"109":23,"110":18,"111":7,"112":2,"113":2,"114":5,"115":5,"116":19,"117":2,"118":2,"119":26,"120":11,"121":15,"122":1,"123":5,"124":5,"125":5,"126":5,"127":6,"128":6,"129":2,"130":5,"131":1,"132":2,"133":2,"134":2,"135":2,"136":2,"137":2,"138":1,"139":17,"140":17,"141":17,"142":7,"143":2,"144":2,"145":5,"146":12,"147":10,"148":9,"149":7,"150":1,"151":2,"152":2,"153":2,"154":4,"155":6,"156":4,"157":1,"158":1,"159":3,"160":2,"161":2,"162":4,"163":6,"164":4,"165":1,"166":1,"167":3,"168":2,"169":1,"170":2,"171":1,"172":1,"173":1,"174":0,"175":1,"176":1,"177":1,"178":1,"179":51,"180":43,"181":43,"182":8,"183":1,"184":51,"185":51,"186":51,"187":1,"188":50,"189":2,"190":48,"191":50,"192":1,"193":60,"194":60,"195":52,"196":52,"197":52,"198":60,"199":1,"200":59,"201":2,"202":57,"203":59,"204":59,"205":1,"206":1,"207":1,"208":1,"209":1,"210":1,"211":1,"212":4,"213":4,"214":6,"215":6,"216":4,"217":5,"218":4,"219":1,"220":1,"221":1,"222":1,"223":1,"224":1,"225":1,"226":1,"227":1,"228":1,"229":1,"230":1,"231":1,"232":1,"233":1,"234":1,"235":61,"236":41,"237":2,"238":39,"239":1},"f":{"0":62,"1":6,"2":12,"3":27,"4":27,"5":27,"6":4,"7":27,"8":41,"9":24,"10":5,"11":2,"12":2,"13":17,"14":2,"15":6,"16":6,"17":2,"18":1,"19":1,"20":51,"21":60,"22":1,"23":4,"24":1,"25":1,"26":1,"27":1,"28":61,"29":41},"b":{"0":[3,3],"1":[6,6],"2":[27,3],"3":[3,24],"4":[27,6],"5":[9,18],"6":[0,19],"7":[19,19],"8":[0,27],"9":[3,6],"10":[0,2],"11":[3,13],"12":[4,1],"13":[4,2],"14":[27,1],"15":[6,21],"16":[27,10],"17":[1,26],"18":[0,1],"19":[40,0],"20":[40,37],"21":[1,40],"22":[12,12],"23":[14,27],"24":[8,6],"25":[1,7],"26":[6,1],"27":[0,5],"28":[1,26],"29":[3,23],"30":[18,5],"31":[2,5],"32":[2,17],"33":[11,15],"34":[5,1],"35":[6,2],"36":[2,4],"37":[2,5],"38":[10,2],"39":[1,3],"40":[1,3],"41":[2,1],"42":[0,1],"43":[1,0],"44":[43,8],"45":[1,7],"46":[51,35],"47":[1,50],"48":[2,48],"49":[60,40],"50":[52,8],"51":[1,59],"52":[2,57],"53":[1,0],"54":[1,0],"55":[1,0],"56":[1,0],"57":[1,1],"58":[61,5,5],"59":[2,39]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"9aa8c8a5aa5ed39ed05b444adf39a3f6ce508b9f","contentHash":"919c95bfd55a08217a62792188dd82a1cc98a911fe4121331b010d95c0f36506"}}
\ No newline at end of file
diff --git a/backend/node_modules/kareem/.nyc_output/processinfo/fa57d6c4-9e78-4624-9229-f77b87a07481.json b/backend/node_modules/kareem/.nyc_output/processinfo/fa57d6c4-9e78-4624-9229-f77b87a07481.json
new file mode 100644
index 0000000..c8858dc
--- /dev/null
+++ b/backend/node_modules/kareem/.nyc_output/processinfo/fa57d6c4-9e78-4624-9229-f77b87a07481.json
@@ -0,0 +1 @@
+{"parent":null,"pid":2678345,"argv":["/home/v/.nvm/versions/node/v20.18.1/bin/node","/home/v/Desktop/MongoDB/kareem/node_modules/.bin/mocha","./test/examples.test.js","./test/misc.test.js","./test/post.test.js","./test/pre.test.js","./test/wrap.test.js"],"execArgv":[],"cwd":"/home/v/Desktop/MongoDB/kareem","time":1756153005026,"ppid":2678334,"coverageFilename":"/home/v/Desktop/MongoDB/kareem/.nyc_output/fa57d6c4-9e78-4624-9229-f77b87a07481.json","externalId":"","uuid":"fa57d6c4-9e78-4624-9229-f77b87a07481","files":["/home/v/Desktop/MongoDB/kareem/index.js"]}
\ No newline at end of file
diff --git a/backend/node_modules/kareem/.nyc_output/processinfo/index.json b/backend/node_modules/kareem/.nyc_output/processinfo/index.json
new file mode 100644
index 0000000..9f2f2cd
--- /dev/null
+++ b/backend/node_modules/kareem/.nyc_output/processinfo/index.json
@@ -0,0 +1 @@
+{"processes":{"fa57d6c4-9e78-4624-9229-f77b87a07481":{"parent":null,"children":[]}},"files":{"/home/v/Desktop/MongoDB/kareem/index.js":["fa57d6c4-9e78-4624-9229-f77b87a07481"]},"externalIds":{}}
\ No newline at end of file
diff --git a/backend/node_modules/kareem/CHANGELOG.md b/backend/node_modules/kareem/CHANGELOG.md
new file mode 100644
index 0000000..2b4d033
--- /dev/null
+++ b/backend/node_modules/kareem/CHANGELOG.md
@@ -0,0 +1,840 @@
+# Changelog
+
+
+## 3.2.0 (2026-01-29)
+
+* feat(exec): add filter option to execPreSync and execPostSync #44
+
+
+## 3.1.0 (2026-01-12)
+
+* feat(exec): add filter option to allow executing hooks based on a filter function #43
+
+
+## 3.0.0 (2025-11-18)
+
+* BREAKING CHANGE: make execPre async and drop callback support #39
+* BREAKING CHANGE: require Node 18
+* feat: overwriteArguments support #42
+
+
+## 2.6.0 (2024-03-04)
+
+* feat: add TypeScript types
+
+
+## 2.5.1 (2023-01-06)
+
+* fix: avoid passing final callback to pre hook, because calling the callback can mess up hook execution #36 Automattic/mongoose#12836
+
+
+## 2.5.0 (2022-12-01)
+
+* feat: add errorHandler option to `post()` #34
+
+
+## 2.4.0 (2022-06-13)
+
+* feat: add `overwriteResult()` and `skipWrappedFunction()` for more advanced control flow
+
+
+## 2.3.4 (2022-02-10)
+
+* perf: various performance improvements #27 #24 #23 #22 #21 #20
+
+
+## 2.3.3 (2021-12-26)
+
+* fix: handle sync errors in `wrap()`
+
+
+## 2.3.2 (2020-12-08)
+
+* fix: handle sync errors in pre hooks if there are multiple hooks
+
+
+## 2.3.0 (2018-09-24)
+
+* chore(release): 2.2.3 ([c8f2695](https://github.com/vkarpov15/kareem/commit/c8f2695))
+* chore(release): 2.2.4 ([a377a4f](https://github.com/vkarpov15/kareem/commit/a377a4f))
+* chore(release): 2.2.5 ([5a495e3](https://github.com/vkarpov15/kareem/commit/5a495e3))
+* fix(filter): copy async pres correctly with `filter()` ([1b1ed8a](https://github.com/vkarpov15/kareem/commit/1b1ed8a)), closes [Automattic/mongoose#3054](https://github.com/Automattic/mongoose/issues/3054)
+* feat: add filter() function ([1f641f4](https://github.com/vkarpov15/kareem/commit/1f641f4))
+* feat: support storing options on pre and post hooks ([59220b9](https://github.com/vkarpov15/kareem/commit/59220b9))
+
+
+
+
+## 2.2.3 (2018-09-10)
+
+* chore: release 2.2.3 ([af653a3](https://github.com/vkarpov15/kareem/commit/af653a3))
+
+
+
+
+## 2.2.2 (2018-09-10)
+
+* chore: release 2.2.2 ([3f0144d](https://github.com/vkarpov15/kareem/commit/3f0144d))
+* fix: allow merge() to not clone ([e628d65](https://github.com/vkarpov15/kareem/commit/e628d65))
+
+
+
+
+## 2.2.1 (2018-06-05)
+
+* chore: release 2.2.1 ([4625a64](https://github.com/vkarpov15/kareem/commit/4625a64))
+* chore: remove lockfile from git ([7f3e4e6](https://github.com/vkarpov15/kareem/commit/7f3e4e6))
+* fix: handle numAsync correctly when merging ([fef8e7e](https://github.com/vkarpov15/kareem/commit/fef8e7e))
+* test: repro issue with not copying numAsync ([952d9db](https://github.com/vkarpov15/kareem/commit/952d9db))
+
+
+
+
+## 2.2.0 (2018-06-05)
+
+* chore: release 2.2.0 ([ff9ad03](https://github.com/vkarpov15/kareem/commit/ff9ad03))
+* fix: use maps instead of objects for _pres and _posts so `toString()` doesn't get reported as having ([55df303](https://github.com/vkarpov15/kareem/commit/55df303)), closes [Automattic/mongoose#6538](https://github.com/Automattic/mongoose/issues/6538)
+
+
+
+
+## 2.1.0 (2018-05-16)
+
+* chore: release 2.1.0 ([ba5f1bc](https://github.com/vkarpov15/kareem/commit/ba5f1bc))
+* feat: add option to check wrapped function return value for promises ([c9d7dd1](https://github.com/vkarpov15/kareem/commit/c9d7dd1))
+* refactor: use const in wrap() ([0fc21f9](https://github.com/vkarpov15/kareem/commit/0fc21f9))
+
+
+
+
+## 2.0.7 (2018-04-28)
+
+* chore: release 2.0.7 ([0bf91e6](https://github.com/vkarpov15/kareem/commit/0bf91e6))
+* feat: add `hasHooks()` ([225f18d](https://github.com/vkarpov15/kareem/commit/225f18d)), closes [Automattic/mongoose#6385](https://github.com/Automattic/mongoose/issues/6385)
+
+
+
+
+## 2.0.6 (2018-03-22)
+
+* chore: release 2.0.6 ([f3d406b](https://github.com/vkarpov15/kareem/commit/f3d406b))
+* fix(wrap): ensure fast path still wraps function in `nextTick()` for chaining ([7000494](https://github.com/vkarpov15/kareem/commit/7000494)), closes [Automattic/mongoose#6250](https://github.com/Automattic/mongoose/issues/6250) [dsanel/mongoose-delete#36](https://github.com/dsanel/mongoose-delete/issues/36)
+
+
+
+
+## 2.0.5 (2018-02-22)
+
+* chore: release 2.0.5 ([3286612](https://github.com/vkarpov15/kareem/commit/3286612))
+* perf(createWrapper): don't create wrapper if there are no hooks ([5afc5b9](https://github.com/vkarpov15/kareem/commit/5afc5b9)), closes [Automattic/mongoose#6126](https://github.com/Automattic/mongoose/issues/6126)
+
+
+
+
+## 2.0.4 (2018-02-08)
+
+* chore: release 2.0.4 ([2ab0293](https://github.com/vkarpov15/kareem/commit/2ab0293))
+
+
+
+
+## 2.0.3 (2018-02-01)
+
+* chore: release 2.0.3 ([3c1abe5](https://github.com/vkarpov15/kareem/commit/3c1abe5))
+* fix: use process.nextTick() re: Automattic/mongoose#6074 ([e5bfe33](https://github.com/vkarpov15/kareem/commit/e5bfe33)), closes [Automattic/mongoose#6074](https://github.com/Automattic/mongoose/issues/6074)
+
+
+
+
+## 2.0.2 (2018-01-24)
+
+* chore: fix license ([a9d755c](https://github.com/vkarpov15/kareem/commit/a9d755c)), closes [#10](https://github.com/vkarpov15/kareem/issues/10)
+* chore: release 2.0.2 ([fe87ab6](https://github.com/vkarpov15/kareem/commit/fe87ab6))
+
+
+
+
+## 2.0.1 (2018-01-09)
+
+* chore: release 2.0.1 with lockfile bump ([09c44fb](https://github.com/vkarpov15/kareem/commit/09c44fb))
+
+
+
+
+## 2.0.0 (2018-01-09)
+
+* chore: bump marked re: security ([cc564a9](https://github.com/vkarpov15/kareem/commit/cc564a9))
+* chore: release 2.0.0 ([f511d1c](https://github.com/vkarpov15/kareem/commit/f511d1c))
+
+
+
+
+## 2.0.0-rc5 (2017-12-23)
+
+* chore: fix build on node 4+5 ([6dac5a4](https://github.com/vkarpov15/kareem/commit/6dac5a4))
+* chore: fix built on node 4 + 5 again ([434ef0a](https://github.com/vkarpov15/kareem/commit/434ef0a))
+* chore: release 2.0.0-rc5 ([25a32ee](https://github.com/vkarpov15/kareem/commit/25a32ee))
+
+
+
+
+## 2.0.0-rc4 (2017-12-22)
+
+* chore: release 2.0.0-rc4 ([49fc083](https://github.com/vkarpov15/kareem/commit/49fc083))
+* BREAKING CHANGE: deduplicate when merging hooks re: Automattic/mongoose#2945 ([d458573](https://github.com/vkarpov15/kareem/commit/d458573)), closes [Automattic/mongoose#2945](https://github.com/Automattic/mongoose/issues/2945)
+
+
+
+
+## 2.0.0-rc3 (2017-12-22)
+
+* chore: release 2.0.0-rc3 ([adaaa00](https://github.com/vkarpov15/kareem/commit/adaaa00))
+* feat: support returning promises from middleware functions ([05b4480](https://github.com/vkarpov15/kareem/commit/05b4480)), closes [Automattic/mongoose#3779](https://github.com/Automattic/mongoose/issues/3779)
+
+
+
+
+## 2.0.0-rc2 (2017-12-21)
+
+* chore: release 2.0.0-rc2 ([76325fa](https://github.com/vkarpov15/kareem/commit/76325fa))
+* fix: ensure next() and done() run in next tick ([6c20684](https://github.com/vkarpov15/kareem/commit/6c20684))
+
+
+
+
+## 2.0.0-rc1 (2017-12-21)
+
+* chore: improve test coverage re: Automattic/mongoose#3232 ([7b45cf0](https://github.com/vkarpov15/kareem/commit/7b45cf0)), closes [Automattic/mongoose#3232](https://github.com/Automattic/mongoose/issues/3232)
+* chore: release 2.0.0-rc1 ([9b83f52](https://github.com/vkarpov15/kareem/commit/9b83f52))
+* BREAKING CHANGE: report sync exceptions as errors, only allow calling next() and done() once ([674adcc](https://github.com/vkarpov15/kareem/commit/674adcc)), closes [Automattic/mongoose#3483](https://github.com/Automattic/mongoose/issues/3483)
+
+
+
+
+## 2.0.0-rc0 (2017-12-17)
+
+* chore: release 2.0.0-rc0 ([16b44b5](https://github.com/vkarpov15/kareem/commit/16b44b5))
+* BREAKING CHANGE: drop support for node < 4 ([9cbb8c7](https://github.com/vkarpov15/kareem/commit/9cbb8c7))
+* BREAKING CHANGE: remove useLegacyPost and add several new features ([6dd8531](https://github.com/vkarpov15/kareem/commit/6dd8531)), closes [Automattic/mongoose#3232](https://github.com/Automattic/mongoose/issues/3232)
+
+
+
+
+## 1.5.0 (2017-07-20)
+
+* chore: release 1.5.0 ([9c491a0](https://github.com/vkarpov15/kareem/commit/9c491a0))
+* fix: improve post error handlers results ([9928dd5](https://github.com/vkarpov15/kareem/commit/9928dd5)), closes [Automattic/mongoose#5466](https://github.com/Automattic/mongoose/issues/5466)
+
+
+
+
+## 1.4.2 (2017-07-06)
+
+* chore: release 1.4.2 ([8d14ac5](https://github.com/vkarpov15/kareem/commit/8d14ac5))
+* fix: correct args re: Automattic/mongoose#5405 ([3f28ae6](https://github.com/vkarpov15/kareem/commit/3f28ae6)), closes [Automattic/mongoose#5405](https://github.com/Automattic/mongoose/issues/5405)
+
+
+
+
+## 1.4.1 (2017-04-25)
+
+* chore: release 1.4.1 ([5ecf0c2](https://github.com/vkarpov15/kareem/commit/5ecf0c2))
+* fix: handle numAsyncPres with clone() ([c72e857](https://github.com/vkarpov15/kareem/commit/c72e857)), closes [#8](https://github.com/vkarpov15/kareem/issues/8)
+* test: repro #8 ([9b4d6b2](https://github.com/vkarpov15/kareem/commit/9b4d6b2)), closes [#8](https://github.com/vkarpov15/kareem/issues/8)
+
+
+
+
+## 1.4.0 (2017-04-19)
+
+* chore: release 1.4.0 ([101c5f5](https://github.com/vkarpov15/kareem/commit/101c5f5))
+* feat: add merge() function ([285325e](https://github.com/vkarpov15/kareem/commit/285325e))
+
+
+
+
+## 1.3.0 (2017-03-26)
+
+* chore: release 1.3.0 ([f3a9e50](https://github.com/vkarpov15/kareem/commit/f3a9e50))
+* feat: pass function args to execPre ([4dd466d](https://github.com/vkarpov15/kareem/commit/4dd466d))
+
+
+
+
+## 1.2.1 (2017-02-03)
+
+* chore: release 1.2.1 ([d97081f](https://github.com/vkarpov15/kareem/commit/d97081f))
+* fix: filter out _kareemIgnored args for error handlers re: Automattic/mongoose#4925 ([ddc7aeb](https://github.com/vkarpov15/kareem/commit/ddc7aeb)), closes [Automattic/mongoose#4925](https://github.com/Automattic/mongoose/issues/4925)
+* fix: make error handlers handle errors in pre hooks ([af38033](https://github.com/vkarpov15/kareem/commit/af38033)), closes [Automattic/mongoose#4927](https://github.com/Automattic/mongoose/issues/4927)
+
+
+
+
+## 1.2.0 (2017-01-02)
+
+* chore: release 1.2.0 ([033225c](https://github.com/vkarpov15/kareem/commit/033225c))
+* chore: upgrade deps ([f9e9a09](https://github.com/vkarpov15/kareem/commit/f9e9a09))
+* feat: add _kareemIgnore re: Automattic/mongoose#4836 ([7957771](https://github.com/vkarpov15/kareem/commit/7957771)), closes [Automattic/mongoose#4836](https://github.com/Automattic/mongoose/issues/4836)
+
+
+
+
+## 1.1.5 (2016-12-13)
+
+* chore: release 1.1.5 ([1a9f684](https://github.com/vkarpov15/kareem/commit/1a9f684))
+* fix: correct field name ([04a0e9d](https://github.com/vkarpov15/kareem/commit/04a0e9d))
+
+
+
+
+## 1.1.4 (2016-12-09)
+
+* chore: release 1.1.4 ([ece401c](https://github.com/vkarpov15/kareem/commit/ece401c))
+* chore: run tests on node 6 ([e0cb1cb](https://github.com/vkarpov15/kareem/commit/e0cb1cb))
+* fix: only copy own properties in clone() ([dfe28ce](https://github.com/vkarpov15/kareem/commit/dfe28ce)), closes [#7](https://github.com/vkarpov15/kareem/issues/7)
+
+
+
+
+## 1.1.3 (2016-06-27)
+
+* chore: release 1.1.3 ([87171c8](https://github.com/vkarpov15/kareem/commit/87171c8))
+* fix: couple more issues with arg processing ([c65f523](https://github.com/vkarpov15/kareem/commit/c65f523))
+
+
+
+
+## 1.1.2 (2016-06-27)
+
+* chore: release 1.1.2 ([8e102b6](https://github.com/vkarpov15/kareem/commit/8e102b6))
+* fix: add early return ([4feda4e](https://github.com/vkarpov15/kareem/commit/4feda4e))
+
+
+
+
+## 1.1.1 (2016-06-27)
+
+* chore: release 1.1.1 ([8bb3050](https://github.com/vkarpov15/kareem/commit/8bb3050))
+* fix: skip error handlers if no error ([0eb3a44](https://github.com/vkarpov15/kareem/commit/0eb3a44))
+
+
+
+
+## 1.1.0 (2016-05-11)
+
+* chore: release 1.1.0 ([85332d9](https://github.com/vkarpov15/kareem/commit/85332d9))
+* chore: test on node 4 and node 5 ([1faefa1](https://github.com/vkarpov15/kareem/commit/1faefa1))
+* 100% coverage again ([c9aee4e](https://github.com/vkarpov15/kareem/commit/c9aee4e))
+* add support for error post hooks ([d378113](https://github.com/vkarpov15/kareem/commit/d378113))
+* basic setup for sync hooks #4 ([55aa081](https://github.com/vkarpov15/kareem/commit/55aa081)), closes [#4](https://github.com/vkarpov15/kareem/issues/4)
+* proof of concept for error handlers ([e4a07d9](https://github.com/vkarpov15/kareem/commit/e4a07d9))
+* refactor out handleWrapError helper ([b19af38](https://github.com/vkarpov15/kareem/commit/b19af38))
+
+
+
+
+## 1.0.1 (2015-05-10)
+
+* Fix #1 ([de60dc6](https://github.com/vkarpov15/kareem/commit/de60dc6)), closes [#1](https://github.com/vkarpov15/kareem/issues/1)
+* release 1.0.1 ([6971088](https://github.com/vkarpov15/kareem/commit/6971088))
+* Run tests on iojs in travis ([adcd201](https://github.com/vkarpov15/kareem/commit/adcd201))
+* support legacy post hook behavior in wrap() ([23fa74c](https://github.com/vkarpov15/kareem/commit/23fa74c))
+* Use node 0.12 in travis ([834689d](https://github.com/vkarpov15/kareem/commit/834689d))
+
+
+
+
+## 1.0.0 (2015-01-28)
+
+* Tag 1.0.0 ([4c5a35a](https://github.com/vkarpov15/kareem/commit/4c5a35a))
+
+
+
+
+## 0.0.8 (2015-01-27)
+
+* Add clone function ([688bba7](https://github.com/vkarpov15/kareem/commit/688bba7))
+* Add jscs for style checking ([5c93149](https://github.com/vkarpov15/kareem/commit/5c93149))
+* Bump 0.0.8 ([03c0d2f](https://github.com/vkarpov15/kareem/commit/03c0d2f))
+* Fix jscs config, add gulp rules ([9989abf](https://github.com/vkarpov15/kareem/commit/9989abf))
+* fix Makefile typo ([1f7e61a](https://github.com/vkarpov15/kareem/commit/1f7e61a))
+
+
+
+
+## 0.0.7 (2015-01-04)
+
+* Bump 0.0.7 ([98ef173](https://github.com/vkarpov15/kareem/commit/98ef173))
+* fix LearnBoost/mongoose#2553 - use null instead of undefined for err ([9157b48](https://github.com/vkarpov15/kareem/commit/9157b48)), closes [LearnBoost/mongoose#2553](https://github.com/LearnBoost/mongoose/issues/2553)
+* Regenerate docs ([2331cdf](https://github.com/vkarpov15/kareem/commit/2331cdf))
+
+
+
+
+## 0.0.6 (2015-01-01)
+
+* Update docs and bump 0.0.6 ([92c12a7](https://github.com/vkarpov15/kareem/commit/92c12a7))
+
+
+
+
+## 0.0.5 (2015-01-01)
+
+* Add coverage rule to Makefile ([825a91c](https://github.com/vkarpov15/kareem/commit/825a91c))
+* Add coveralls to README ([fb52369](https://github.com/vkarpov15/kareem/commit/fb52369))
+* Add coveralls to travis ([93f6f15](https://github.com/vkarpov15/kareem/commit/93f6f15))
+* Add createWrapper() function ([ea77741](https://github.com/vkarpov15/kareem/commit/ea77741))
+* Add istanbul code coverage ([6eceeef](https://github.com/vkarpov15/kareem/commit/6eceeef))
+* Add some more comments for examples ([c5b0c6f](https://github.com/vkarpov15/kareem/commit/c5b0c6f))
+* Add travis ([e6dcb06](https://github.com/vkarpov15/kareem/commit/e6dcb06))
+* Add travis badge to docs ([ad8c9b3](https://github.com/vkarpov15/kareem/commit/ad8c9b3))
+* Add wrap() tests, 100% coverage ([6945be4](https://github.com/vkarpov15/kareem/commit/6945be4))
+* Better test coverage for execPost ([d9ad539](https://github.com/vkarpov15/kareem/commit/d9ad539))
+* Bump 0.0.5 ([69875b1](https://github.com/vkarpov15/kareem/commit/69875b1))
+* Docs fix ([15b7098](https://github.com/vkarpov15/kareem/commit/15b7098))
+* Fix silly mistake in docs generation ([50373eb](https://github.com/vkarpov15/kareem/commit/50373eb))
+* Fix typo in readme ([fec4925](https://github.com/vkarpov15/kareem/commit/fec4925))
+* Linkify travis badge ([92b25fe](https://github.com/vkarpov15/kareem/commit/92b25fe))
+* Make travis run coverage ([747157b](https://github.com/vkarpov15/kareem/commit/747157b))
+* Move travis status badge ([d52e89b](https://github.com/vkarpov15/kareem/commit/d52e89b))
+* Quick fix for coverage ([50bbddb](https://github.com/vkarpov15/kareem/commit/50bbddb))
+* Typo fix ([adea794](https://github.com/vkarpov15/kareem/commit/adea794))
+
+
+
+
+## 0.0.4 (2014-12-13)
+
+* Bump 0.0.4, run docs generation ([51a15fe](https://github.com/vkarpov15/kareem/commit/51a15fe))
+* Use correct post parameters in wrap() ([9bb5da3](https://github.com/vkarpov15/kareem/commit/9bb5da3))
+
+
+
+
+## 0.0.3 (2014-12-12)
+
+* Add npm test script, fix small bug with args not getting passed through post ([49e3e68](https://github.com/vkarpov15/kareem/commit/49e3e68))
+* Bump 0.0.3 ([65621d8](https://github.com/vkarpov15/kareem/commit/65621d8))
+* Update readme ([901388b](https://github.com/vkarpov15/kareem/commit/901388b))
+
+
+
+
+## 0.0.2 (2014-12-12)
+
+* Add github repo and bump 0.0.2 ([59db8be](https://github.com/vkarpov15/kareem/commit/59db8be))
+
+
+
+
+## 0.0.1 (2014-12-12)
+
+* Add basic docs ([ad29ea4](https://github.com/vkarpov15/kareem/commit/ad29ea4))
+* Add pre hooks ([2ffc356](https://github.com/vkarpov15/kareem/commit/2ffc356))
+* Add wrap function ([68c540c](https://github.com/vkarpov15/kareem/commit/68c540c))
+* Bump to version 0.0.1 ([a4bfd68](https://github.com/vkarpov15/kareem/commit/a4bfd68))
+* Initial commit ([4002458](https://github.com/vkarpov15/kareem/commit/4002458))
+* Initial deposit ([98fc489](https://github.com/vkarpov15/kareem/commit/98fc489))
+* Post hooks ([395b67c](https://github.com/vkarpov15/kareem/commit/395b67c))
+* Some basic setup work ([82df75e](https://github.com/vkarpov15/kareem/commit/82df75e))
+* Support sync pre hooks ([1cc1b9f](https://github.com/vkarpov15/kareem/commit/1cc1b9f))
+* Update package.json description ([978da18](https://github.com/vkarpov15/kareem/commit/978da18))
+
+
+
+
+## 2.2.5 (2018-09-24)
+
+
+
+
+
+## 2.2.4 (2018-09-24)
+
+
+
+
+
+## 2.2.3 (2018-09-24)
+
+* fix(filter): copy async pres correctly with `filter()` ([1b1ed8a](https://github.com/vkarpov15/kareem/commit/1b1ed8a)), closes [Automattic/mongoose#3054](https://github.com/Automattic/mongoose/issues/3054)
+* feat: add filter() function ([1f641f4](https://github.com/vkarpov15/kareem/commit/1f641f4))
+* feat: support storing options on pre and post hooks ([59220b9](https://github.com/vkarpov15/kareem/commit/59220b9))
+
+
+
+
+## 2.2.3 (2018-09-10)
+
+* chore: release 2.2.3 ([af653a3](https://github.com/vkarpov15/kareem/commit/af653a3))
+
+
+
+
+## 2.2.2 (2018-09-10)
+
+* chore: release 2.2.2 ([3f0144d](https://github.com/vkarpov15/kareem/commit/3f0144d))
+* fix: allow merge() to not clone ([e628d65](https://github.com/vkarpov15/kareem/commit/e628d65))
+
+
+
+
+## 2.2.1 (2018-06-05)
+
+* chore: release 2.2.1 ([4625a64](https://github.com/vkarpov15/kareem/commit/4625a64))
+* chore: remove lockfile from git ([7f3e4e6](https://github.com/vkarpov15/kareem/commit/7f3e4e6))
+* fix: handle numAsync correctly when merging ([fef8e7e](https://github.com/vkarpov15/kareem/commit/fef8e7e))
+* test: repro issue with not copying numAsync ([952d9db](https://github.com/vkarpov15/kareem/commit/952d9db))
+
+
+
+
+## 2.2.0 (2018-06-05)
+
+* chore: release 2.2.0 ([ff9ad03](https://github.com/vkarpov15/kareem/commit/ff9ad03))
+* fix: use maps instead of objects for _pres and _posts so `toString()` doesn't get reported as having ([55df303](https://github.com/vkarpov15/kareem/commit/55df303)), closes [Automattic/mongoose#6538](https://github.com/Automattic/mongoose/issues/6538)
+
+
+
+
+## 2.1.0 (2018-05-16)
+
+* chore: release 2.1.0 ([ba5f1bc](https://github.com/vkarpov15/kareem/commit/ba5f1bc))
+* feat: add option to check wrapped function return value for promises ([c9d7dd1](https://github.com/vkarpov15/kareem/commit/c9d7dd1))
+* refactor: use const in wrap() ([0fc21f9](https://github.com/vkarpov15/kareem/commit/0fc21f9))
+
+
+
+
+## 2.0.7 (2018-04-28)
+
+* chore: release 2.0.7 ([0bf91e6](https://github.com/vkarpov15/kareem/commit/0bf91e6))
+* feat: add `hasHooks()` ([225f18d](https://github.com/vkarpov15/kareem/commit/225f18d)), closes [Automattic/mongoose#6385](https://github.com/Automattic/mongoose/issues/6385)
+
+
+
+
+## 2.0.6 (2018-03-22)
+
+* chore: release 2.0.6 ([f3d406b](https://github.com/vkarpov15/kareem/commit/f3d406b))
+* fix(wrap): ensure fast path still wraps function in `nextTick()` for chaining ([7000494](https://github.com/vkarpov15/kareem/commit/7000494)), closes [Automattic/mongoose#6250](https://github.com/Automattic/mongoose/issues/6250) [dsanel/mongoose-delete#36](https://github.com/dsanel/mongoose-delete/issues/36)
+
+
+
+
+## 2.0.5 (2018-02-22)
+
+* chore: release 2.0.5 ([3286612](https://github.com/vkarpov15/kareem/commit/3286612))
+* perf(createWrapper): don't create wrapper if there are no hooks ([5afc5b9](https://github.com/vkarpov15/kareem/commit/5afc5b9)), closes [Automattic/mongoose#6126](https://github.com/Automattic/mongoose/issues/6126)
+
+
+
+
+## 2.0.4 (2018-02-08)
+
+* chore: release 2.0.4 ([2ab0293](https://github.com/vkarpov15/kareem/commit/2ab0293))
+
+
+
+
+## 2.0.3 (2018-02-01)
+
+* chore: release 2.0.3 ([3c1abe5](https://github.com/vkarpov15/kareem/commit/3c1abe5))
+* fix: use process.nextTick() re: Automattic/mongoose#6074 ([e5bfe33](https://github.com/vkarpov15/kareem/commit/e5bfe33)), closes [Automattic/mongoose#6074](https://github.com/Automattic/mongoose/issues/6074)
+
+
+
+
+## 2.0.2 (2018-01-24)
+
+* chore: fix license ([a9d755c](https://github.com/vkarpov15/kareem/commit/a9d755c)), closes [#10](https://github.com/vkarpov15/kareem/issues/10)
+* chore: release 2.0.2 ([fe87ab6](https://github.com/vkarpov15/kareem/commit/fe87ab6))
+
+
+
+
+## 2.0.1 (2018-01-09)
+
+* chore: release 2.0.1 with lockfile bump ([09c44fb](https://github.com/vkarpov15/kareem/commit/09c44fb))
+
+
+
+
+## 2.0.0 (2018-01-09)
+
+* chore: bump marked re: security ([cc564a9](https://github.com/vkarpov15/kareem/commit/cc564a9))
+* chore: release 2.0.0 ([f511d1c](https://github.com/vkarpov15/kareem/commit/f511d1c))
+
+
+
+
+## 2.0.0-rc5 (2017-12-23)
+
+* chore: fix build on node 4+5 ([6dac5a4](https://github.com/vkarpov15/kareem/commit/6dac5a4))
+* chore: fix built on node 4 + 5 again ([434ef0a](https://github.com/vkarpov15/kareem/commit/434ef0a))
+* chore: release 2.0.0-rc5 ([25a32ee](https://github.com/vkarpov15/kareem/commit/25a32ee))
+
+
+
+
+## 2.0.0-rc4 (2017-12-22)
+
+* chore: release 2.0.0-rc4 ([49fc083](https://github.com/vkarpov15/kareem/commit/49fc083))
+* BREAKING CHANGE: deduplicate when merging hooks re: Automattic/mongoose#2945 ([d458573](https://github.com/vkarpov15/kareem/commit/d458573)), closes [Automattic/mongoose#2945](https://github.com/Automattic/mongoose/issues/2945)
+
+
+
+
+## 2.0.0-rc3 (2017-12-22)
+
+* chore: release 2.0.0-rc3 ([adaaa00](https://github.com/vkarpov15/kareem/commit/adaaa00))
+* feat: support returning promises from middleware functions ([05b4480](https://github.com/vkarpov15/kareem/commit/05b4480)), closes [Automattic/mongoose#3779](https://github.com/Automattic/mongoose/issues/3779)
+
+
+
+
+## 2.0.0-rc2 (2017-12-21)
+
+* chore: release 2.0.0-rc2 ([76325fa](https://github.com/vkarpov15/kareem/commit/76325fa))
+* fix: ensure next() and done() run in next tick ([6c20684](https://github.com/vkarpov15/kareem/commit/6c20684))
+
+
+
+
+## 2.0.0-rc1 (2017-12-21)
+
+* chore: improve test coverage re: Automattic/mongoose#3232 ([7b45cf0](https://github.com/vkarpov15/kareem/commit/7b45cf0)), closes [Automattic/mongoose#3232](https://github.com/Automattic/mongoose/issues/3232)
+* chore: release 2.0.0-rc1 ([9b83f52](https://github.com/vkarpov15/kareem/commit/9b83f52))
+* BREAKING CHANGE: report sync exceptions as errors, only allow calling next() and done() once ([674adcc](https://github.com/vkarpov15/kareem/commit/674adcc)), closes [Automattic/mongoose#3483](https://github.com/Automattic/mongoose/issues/3483)
+
+
+
+
+## 2.0.0-rc0 (2017-12-17)
+
+* chore: release 2.0.0-rc0 ([16b44b5](https://github.com/vkarpov15/kareem/commit/16b44b5))
+* BREAKING CHANGE: drop support for node < 4 ([9cbb8c7](https://github.com/vkarpov15/kareem/commit/9cbb8c7))
+* BREAKING CHANGE: remove useLegacyPost and add several new features ([6dd8531](https://github.com/vkarpov15/kareem/commit/6dd8531)), closes [Automattic/mongoose#3232](https://github.com/Automattic/mongoose/issues/3232)
+
+
+
+
+## 1.5.0 (2017-07-20)
+
+* chore: release 1.5.0 ([9c491a0](https://github.com/vkarpov15/kareem/commit/9c491a0))
+* fix: improve post error handlers results ([9928dd5](https://github.com/vkarpov15/kareem/commit/9928dd5)), closes [Automattic/mongoose#5466](https://github.com/Automattic/mongoose/issues/5466)
+
+
+
+
+## 1.4.2 (2017-07-06)
+
+* chore: release 1.4.2 ([8d14ac5](https://github.com/vkarpov15/kareem/commit/8d14ac5))
+* fix: correct args re: Automattic/mongoose#5405 ([3f28ae6](https://github.com/vkarpov15/kareem/commit/3f28ae6)), closes [Automattic/mongoose#5405](https://github.com/Automattic/mongoose/issues/5405)
+
+
+
+
+## 1.4.1 (2017-04-25)
+
+* chore: release 1.4.1 ([5ecf0c2](https://github.com/vkarpov15/kareem/commit/5ecf0c2))
+* fix: handle numAsyncPres with clone() ([c72e857](https://github.com/vkarpov15/kareem/commit/c72e857)), closes [#8](https://github.com/vkarpov15/kareem/issues/8)
+* test: repro #8 ([9b4d6b2](https://github.com/vkarpov15/kareem/commit/9b4d6b2)), closes [#8](https://github.com/vkarpov15/kareem/issues/8)
+
+
+
+
+## 1.4.0 (2017-04-19)
+
+* chore: release 1.4.0 ([101c5f5](https://github.com/vkarpov15/kareem/commit/101c5f5))
+* feat: add merge() function ([285325e](https://github.com/vkarpov15/kareem/commit/285325e))
+
+
+
+
+## 1.3.0 (2017-03-26)
+
+* chore: release 1.3.0 ([f3a9e50](https://github.com/vkarpov15/kareem/commit/f3a9e50))
+* feat: pass function args to execPre ([4dd466d](https://github.com/vkarpov15/kareem/commit/4dd466d))
+
+
+
+
+## 1.2.1 (2017-02-03)
+
+* chore: release 1.2.1 ([d97081f](https://github.com/vkarpov15/kareem/commit/d97081f))
+* fix: filter out _kareemIgnored args for error handlers re: Automattic/mongoose#4925 ([ddc7aeb](https://github.com/vkarpov15/kareem/commit/ddc7aeb)), closes [Automattic/mongoose#4925](https://github.com/Automattic/mongoose/issues/4925)
+* fix: make error handlers handle errors in pre hooks ([af38033](https://github.com/vkarpov15/kareem/commit/af38033)), closes [Automattic/mongoose#4927](https://github.com/Automattic/mongoose/issues/4927)
+
+
+
+
+## 1.2.0 (2017-01-02)
+
+* chore: release 1.2.0 ([033225c](https://github.com/vkarpov15/kareem/commit/033225c))
+* chore: upgrade deps ([f9e9a09](https://github.com/vkarpov15/kareem/commit/f9e9a09))
+* feat: add _kareemIgnore re: Automattic/mongoose#4836 ([7957771](https://github.com/vkarpov15/kareem/commit/7957771)), closes [Automattic/mongoose#4836](https://github.com/Automattic/mongoose/issues/4836)
+
+
+
+
+## 1.1.5 (2016-12-13)
+
+* chore: release 1.1.5 ([1a9f684](https://github.com/vkarpov15/kareem/commit/1a9f684))
+* fix: correct field name ([04a0e9d](https://github.com/vkarpov15/kareem/commit/04a0e9d))
+
+
+
+
+## 1.1.4 (2016-12-09)
+
+* chore: release 1.1.4 ([ece401c](https://github.com/vkarpov15/kareem/commit/ece401c))
+* chore: run tests on node 6 ([e0cb1cb](https://github.com/vkarpov15/kareem/commit/e0cb1cb))
+* fix: only copy own properties in clone() ([dfe28ce](https://github.com/vkarpov15/kareem/commit/dfe28ce)), closes [#7](https://github.com/vkarpov15/kareem/issues/7)
+
+
+
+
+## 1.1.3 (2016-06-27)
+
+* chore: release 1.1.3 ([87171c8](https://github.com/vkarpov15/kareem/commit/87171c8))
+* fix: couple more issues with arg processing ([c65f523](https://github.com/vkarpov15/kareem/commit/c65f523))
+
+
+
+
+## 1.1.2 (2016-06-27)
+
+* chore: release 1.1.2 ([8e102b6](https://github.com/vkarpov15/kareem/commit/8e102b6))
+* fix: add early return ([4feda4e](https://github.com/vkarpov15/kareem/commit/4feda4e))
+
+
+
+
+## 1.1.1 (2016-06-27)
+
+* chore: release 1.1.1 ([8bb3050](https://github.com/vkarpov15/kareem/commit/8bb3050))
+* fix: skip error handlers if no error ([0eb3a44](https://github.com/vkarpov15/kareem/commit/0eb3a44))
+
+
+
+
+## 1.1.0 (2016-05-11)
+
+* chore: release 1.1.0 ([85332d9](https://github.com/vkarpov15/kareem/commit/85332d9))
+* chore: test on node 4 and node 5 ([1faefa1](https://github.com/vkarpov15/kareem/commit/1faefa1))
+* 100% coverage again ([c9aee4e](https://github.com/vkarpov15/kareem/commit/c9aee4e))
+* add support for error post hooks ([d378113](https://github.com/vkarpov15/kareem/commit/d378113))
+* basic setup for sync hooks #4 ([55aa081](https://github.com/vkarpov15/kareem/commit/55aa081)), closes [#4](https://github.com/vkarpov15/kareem/issues/4)
+* proof of concept for error handlers ([e4a07d9](https://github.com/vkarpov15/kareem/commit/e4a07d9))
+* refactor out handleWrapError helper ([b19af38](https://github.com/vkarpov15/kareem/commit/b19af38))
+
+
+
+
+## 1.0.1 (2015-05-10)
+
+* Fix #1 ([de60dc6](https://github.com/vkarpov15/kareem/commit/de60dc6)), closes [#1](https://github.com/vkarpov15/kareem/issues/1)
+* release 1.0.1 ([6971088](https://github.com/vkarpov15/kareem/commit/6971088))
+* Run tests on iojs in travis ([adcd201](https://github.com/vkarpov15/kareem/commit/adcd201))
+* support legacy post hook behavior in wrap() ([23fa74c](https://github.com/vkarpov15/kareem/commit/23fa74c))
+* Use node 0.12 in travis ([834689d](https://github.com/vkarpov15/kareem/commit/834689d))
+
+
+
+
+## 1.0.0 (2015-01-28)
+
+* Tag 1.0.0 ([4c5a35a](https://github.com/vkarpov15/kareem/commit/4c5a35a))
+
+
+
+
+## 0.0.8 (2015-01-27)
+
+* Add clone function ([688bba7](https://github.com/vkarpov15/kareem/commit/688bba7))
+* Add jscs for style checking ([5c93149](https://github.com/vkarpov15/kareem/commit/5c93149))
+* Bump 0.0.8 ([03c0d2f](https://github.com/vkarpov15/kareem/commit/03c0d2f))
+* Fix jscs config, add gulp rules ([9989abf](https://github.com/vkarpov15/kareem/commit/9989abf))
+* fix Makefile typo ([1f7e61a](https://github.com/vkarpov15/kareem/commit/1f7e61a))
+
+
+
+
+## 0.0.7 (2015-01-04)
+
+* Bump 0.0.7 ([98ef173](https://github.com/vkarpov15/kareem/commit/98ef173))
+* fix LearnBoost/mongoose#2553 - use null instead of undefined for err ([9157b48](https://github.com/vkarpov15/kareem/commit/9157b48)), closes [LearnBoost/mongoose#2553](https://github.com/LearnBoost/mongoose/issues/2553)
+* Regenerate docs ([2331cdf](https://github.com/vkarpov15/kareem/commit/2331cdf))
+
+
+
+
+## 0.0.6 (2015-01-01)
+
+* Update docs and bump 0.0.6 ([92c12a7](https://github.com/vkarpov15/kareem/commit/92c12a7))
+
+
+
+
+## 0.0.5 (2015-01-01)
+
+* Add coverage rule to Makefile ([825a91c](https://github.com/vkarpov15/kareem/commit/825a91c))
+* Add coveralls to README ([fb52369](https://github.com/vkarpov15/kareem/commit/fb52369))
+* Add coveralls to travis ([93f6f15](https://github.com/vkarpov15/kareem/commit/93f6f15))
+* Add createWrapper() function ([ea77741](https://github.com/vkarpov15/kareem/commit/ea77741))
+* Add istanbul code coverage ([6eceeef](https://github.com/vkarpov15/kareem/commit/6eceeef))
+* Add some more comments for examples ([c5b0c6f](https://github.com/vkarpov15/kareem/commit/c5b0c6f))
+* Add travis ([e6dcb06](https://github.com/vkarpov15/kareem/commit/e6dcb06))
+* Add travis badge to docs ([ad8c9b3](https://github.com/vkarpov15/kareem/commit/ad8c9b3))
+* Add wrap() tests, 100% coverage ([6945be4](https://github.com/vkarpov15/kareem/commit/6945be4))
+* Better test coverage for execPost ([d9ad539](https://github.com/vkarpov15/kareem/commit/d9ad539))
+* Bump 0.0.5 ([69875b1](https://github.com/vkarpov15/kareem/commit/69875b1))
+* Docs fix ([15b7098](https://github.com/vkarpov15/kareem/commit/15b7098))
+* Fix silly mistake in docs generation ([50373eb](https://github.com/vkarpov15/kareem/commit/50373eb))
+* Fix typo in readme ([fec4925](https://github.com/vkarpov15/kareem/commit/fec4925))
+* Linkify travis badge ([92b25fe](https://github.com/vkarpov15/kareem/commit/92b25fe))
+* Make travis run coverage ([747157b](https://github.com/vkarpov15/kareem/commit/747157b))
+* Move travis status badge ([d52e89b](https://github.com/vkarpov15/kareem/commit/d52e89b))
+* Quick fix for coverage ([50bbddb](https://github.com/vkarpov15/kareem/commit/50bbddb))
+* Typo fix ([adea794](https://github.com/vkarpov15/kareem/commit/adea794))
+
+
+
+
+## 0.0.4 (2014-12-13)
+
+* Bump 0.0.4, run docs generation ([51a15fe](https://github.com/vkarpov15/kareem/commit/51a15fe))
+* Use correct post parameters in wrap() ([9bb5da3](https://github.com/vkarpov15/kareem/commit/9bb5da3))
+
+
+
+
+## 0.0.3 (2014-12-12)
+
+* Add npm test script, fix small bug with args not getting passed through post ([49e3e68](https://github.com/vkarpov15/kareem/commit/49e3e68))
+* Bump 0.0.3 ([65621d8](https://github.com/vkarpov15/kareem/commit/65621d8))
+* Update readme ([901388b](https://github.com/vkarpov15/kareem/commit/901388b))
+
+
+
+
+## 0.0.2 (2014-12-12)
+
+* Add github repo and bump 0.0.2 ([59db8be](https://github.com/vkarpov15/kareem/commit/59db8be))
+
+
+
+
+## 0.0.1 (2014-12-12)
+
+* Add basic docs ([ad29ea4](https://github.com/vkarpov15/kareem/commit/ad29ea4))
+* Add pre hooks ([2ffc356](https://github.com/vkarpov15/kareem/commit/2ffc356))
+* Add wrap function ([68c540c](https://github.com/vkarpov15/kareem/commit/68c540c))
+* Bump to version 0.0.1 ([a4bfd68](https://github.com/vkarpov15/kareem/commit/a4bfd68))
+* Initial commit ([4002458](https://github.com/vkarpov15/kareem/commit/4002458))
+* Initial deposit ([98fc489](https://github.com/vkarpov15/kareem/commit/98fc489))
+* Post hooks ([395b67c](https://github.com/vkarpov15/kareem/commit/395b67c))
+* Some basic setup work ([82df75e](https://github.com/vkarpov15/kareem/commit/82df75e))
+* Support sync pre hooks ([1cc1b9f](https://github.com/vkarpov15/kareem/commit/1cc1b9f))
+* Update package.json description ([978da18](https://github.com/vkarpov15/kareem/commit/978da18))
diff --git a/backend/node_modules/kareem/LICENSE b/backend/node_modules/kareem/LICENSE
new file mode 100644
index 0000000..b0d46d3
--- /dev/null
+++ b/backend/node_modules/kareem/LICENSE
@@ -0,0 +1,202 @@
+Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2014-2022 mongoosejs
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
diff --git a/backend/node_modules/kareem/README.md b/backend/node_modules/kareem/README.md
new file mode 100644
index 0000000..92b01c9
--- /dev/null
+++ b/backend/node_modules/kareem/README.md
@@ -0,0 +1,385 @@
+# kareem
+
+ [](https://github.com/mongoosejs/kareem/actions/workflows/test.yml)
+
+
+Re-imagined take on the [hooks](http://npmjs.org/package/hooks) module, meant to offer additional flexibility in allowing you to execute hooks whenever necessary, as opposed to simply wrapping a single function.
+
+Named for the NBA's 2nd all-time leading scorer Kareem Abdul-Jabbar, known for his mastery of the [hook shot](http://en.wikipedia.org/wiki/Kareem_Abdul-Jabbar#Skyhook)
+
+
+
+
+
+# API
+
+## pre hooks
+
+Much like [hooks](https://npmjs.org/package/hooks), kareem lets you define
+pre and post hooks: pre hooks are called before a given function executes.
+Unlike hooks, kareem stores hooks and other internal state in a separate
+object, rather than relying on inheritance. Furthermore, kareem exposes
+an `execPre()` function that allows you to execute your pre hooks when
+appropriate, giving you more fine-grained control over your function hooks.
+
+### It runs without any hooks specified
+
+```javascript
+await hooks.execPre('cook', null);
+```
+
+### It runs basic serial pre hooks
+
+pre hook functions can return a promise that resolves when finished.
+
+```javascript
+let count = 0;
+
+hooks.pre('cook', function() {
+ ++count;
+ return Promise.resolve();
+});
+
+await hooks.execPre('cook', null);
+assert.equal(1, count);
+```
+
+### It can run multiple pre hooks
+
+```javascript
+let count1 = 0;
+let count2 = 0;
+
+hooks.pre('cook', function() {
+ ++count1;
+ return Promise.resolve();
+});
+
+hooks.pre('cook', function() {
+ ++count2;
+ return Promise.resolve();
+});
+
+await hooks.execPre('cook', null);
+assert.equal(1, count1);
+assert.equal(1, count2);
+```
+
+### It can run fully synchronous pre hooks
+
+If your pre hook function takes no parameters, its assumed to be
+fully synchronous.
+
+```javascript
+let count1 = 0;
+let count2 = 0;
+
+hooks.pre('cook', function() {
+ ++count1;
+});
+
+hooks.pre('cook', function() {
+ ++count2;
+});
+
+await hooks.execPre('cook', null);
+assert.equal(1, count1);
+assert.equal(1, count2);
+```
+
+### It properly attaches context to pre hooks
+
+Pre save hook functions are bound to the second parameter to `execPre()`
+
+```javascript
+hooks.pre('cook', function() {
+ this.bacon = 3;
+});
+
+hooks.pre('cook', function() {
+ this.eggs = 4;
+});
+
+const obj = { bacon: 0, eggs: 0 };
+
+// In the pre hooks, `this` will refer to `obj`
+await hooks.execPre('cook', obj);
+assert.equal(3, obj.bacon);
+assert.equal(4, obj.eggs);
+```
+
+### It supports returning a promise
+
+You can also return a promise from your pre hooks instead of calling
+`next()`. When the returned promise resolves, kareem will kick off the
+next middleware.
+
+```javascript
+hooks.pre('cook', function() {
+ return new Promise(resolve => {
+ setTimeout(() => {
+ this.bacon = 3;
+ resolve();
+ }, 100);
+ });
+});
+
+const obj = { bacon: 0 };
+
+await hooks.execPre('cook', obj);
+assert.equal(3, obj.bacon);
+```
+
+### It supports filtering which hooks to run
+
+You can pass a `filter` option to `execPre()` to select which hooks
+to run. The filter function receives each hook object and should return
+`true` to run the hook or `false` to skip it.
+
+```javascript
+const execed = [];
+
+const fn1 = function() { execed.push('first'); };
+fn1.skipMe = true;
+hooks.pre('cook', fn1);
+
+const fn2 = function() { execed.push('second'); };
+hooks.pre('cook', fn2);
+
+// Only runs fn2, skips fn1 because fn1.skipMe is true
+await hooks.execPre('cook', null, [], {
+ filter: hook => !hook.fn.skipMe
+});
+
+assert.deepStrictEqual(execed, ['second']);
+```
+
+## post hooks
+
+### It runs without any hooks specified
+
+```javascript
+const [eggs] = await hooks.execPost('cook', null, [1]);
+assert.equal(eggs, 1);
+```
+
+### It executes with parameters passed in
+
+```javascript
+hooks.post('cook', function(eggs, bacon, callback) {
+ assert.equal(eggs, 1);
+ assert.equal(bacon, 2);
+ callback();
+});
+
+const [eggs, bacon] = await hooks.execPost('cook', null, [1, 2]);
+assert.equal(eggs, 1);
+assert.equal(bacon, 2);
+```
+
+### It can use synchronous post hooks
+
+```javascript
+const execed = {};
+
+hooks.post('cook', function(eggs, bacon) {
+ execed.first = true;
+ assert.equal(eggs, 1);
+ assert.equal(bacon, 2);
+});
+
+hooks.post('cook', function(eggs, bacon, callback) {
+ execed.second = true;
+ assert.equal(eggs, 1);
+ assert.equal(bacon, 2);
+ callback();
+});
+
+const [eggs, bacon] = await hooks.execPost('cook', null, [1, 2]);
+assert.equal(Object.keys(execed).length, 2);
+assert.ok(execed.first);
+assert.ok(execed.second);
+assert.equal(eggs, 1);
+assert.equal(bacon, 2);
+```
+
+### It supports returning a promise
+
+You can also return a promise from your post hooks instead of calling
+`next()`. When the returned promise resolves, kareem will kick off the
+next middleware.
+
+```javascript
+hooks.post('cook', function() {
+ return new Promise(resolve => {
+ setTimeout(() => {
+ this.bacon = 3;
+ resolve();
+ }, 100);
+ });
+});
+
+const obj = { bacon: 0 };
+
+await hooks.execPost('cook', obj, [obj]);
+assert.equal(obj.bacon, 3);
+```
+
+### It supports filtering which hooks to run
+
+You can pass a `filter` option to `execPost()` to select which hooks
+to run. The filter function receives each hook object and should return
+`true` to run the hook or `false` to skip it.
+
+```javascript
+const execed = [];
+
+const fn1 = function() { execed.push('first'); };
+fn1.skipMe = true;
+hooks.post('cook', fn1);
+
+const fn2 = function() { execed.push('second'); };
+hooks.post('cook', fn2);
+
+// Only runs fn2, skips fn1 because fn1.skipMe is true
+await hooks.execPost('cook', null, [], {
+ filter: hook => !hook.fn.skipMe
+});
+
+assert.deepStrictEqual(execed, ['second']);
+```
+
+## wrap()
+
+### It wraps pre and post calls into one call
+
+```javascript
+hooks.pre('cook', function() {
+ return new Promise(resolve => {
+ this.bacon = 3;
+ setTimeout(() => {
+ resolve();
+ }, 5);
+ });
+});
+
+hooks.pre('cook', function() {
+ this.eggs = 4;
+ return Promise.resolve();
+});
+
+hooks.pre('cook', function() {
+ this.waffles = false;
+ return Promise.resolve();
+});
+
+hooks.post('cook', function(obj) {
+ obj.tofu = 'no';
+});
+
+const obj = { bacon: 0, eggs: 0 };
+
+const args = [obj];
+
+const result = await hooks.wrap(
+ 'cook',
+ function(o) {
+ assert.equal(obj.bacon, 3);
+ assert.equal(obj.eggs, 4);
+ assert.equal(obj.waffles, false);
+ assert.equal(obj.tofu, undefined);
+ return o;
+ },
+ obj,
+ args);
+
+assert.equal(obj.bacon, 3);
+assert.equal(obj.eggs, 4);
+assert.equal(obj.waffles, false);
+assert.equal(obj.tofu, 'no');
+assert.equal(result, obj);
+```
+
+## createWrapper()
+
+### It wraps wrap() into a callable function
+
+```javascript
+hooks.pre('cook', function() {
+ this.bacon = 3;
+ return Promise.resolve();
+});
+
+hooks.pre('cook', function() {
+ return new Promise(resolve => {
+ this.eggs = 4;
+ setTimeout(function() {
+ resolve();
+ }, 10);
+ });
+});
+
+hooks.pre('cook', function() {
+ this.waffles = false;
+ return Promise.resolve();
+});
+
+hooks.post('cook', function(obj) {
+ obj.tofu = 'no';
+});
+
+const obj = { bacon: 0, eggs: 0 };
+
+const cook = hooks.createWrapper(
+ 'cook',
+ function(o) {
+ assert.equal(3, obj.bacon);
+ assert.equal(4, obj.eggs);
+ assert.equal(false, obj.waffles);
+ assert.equal(undefined, obj.tofu);
+ return o;
+ },
+ obj);
+
+const result = await cook(obj);
+assert.equal(obj.bacon, 3);
+assert.equal(obj.eggs, 4);
+assert.equal(obj.waffles, false);
+assert.equal(obj.tofu, 'no');
+
+assert.equal(result, obj);
+```
+
+## clone()
+
+### It clones a Kareem object
+
+```javascript
+const k1 = new Kareem();
+k1.pre('cook', function() {});
+k1.post('cook', function() {});
+
+const k2 = k1.clone();
+assert.deepEqual(Array.from(k2._pres.keys()), ['cook']);
+assert.deepEqual(Array.from(k2._posts.keys()), ['cook']);
+```
+
+## merge()
+
+### It pulls hooks from another Kareem object
+
+```javascript
+const k1 = new Kareem();
+const test1 = function() {};
+k1.pre('cook', test1);
+k1.post('cook', function() {});
+
+const k2 = new Kareem();
+const test2 = function() {};
+k2.pre('cook', test2);
+const k3 = k2.merge(k1);
+assert.equal(k3._pres.get('cook').length, 2);
+assert.equal(k3._pres.get('cook')[0].fn, test2);
+assert.equal(k3._pres.get('cook')[1].fn, test1);
+assert.equal(k3._posts.get('cook').length, 1);
+```
diff --git a/backend/node_modules/kareem/SECURITY.md b/backend/node_modules/kareem/SECURITY.md
new file mode 100644
index 0000000..da9c516
--- /dev/null
+++ b/backend/node_modules/kareem/SECURITY.md
@@ -0,0 +1,5 @@
+## Security contact information
+
+To report a security vulnerability, please use the
+[Tidelift security contact](https://tidelift.com/security).
+Tidelift will coordinate the fix and disclosure.
diff --git a/backend/node_modules/kareem/coverage/lcov-report/base.css b/backend/node_modules/kareem/coverage/lcov-report/base.css
new file mode 100644
index 0000000..f418035
--- /dev/null
+++ b/backend/node_modules/kareem/coverage/lcov-report/base.css
@@ -0,0 +1,224 @@
+body, html {
+ margin:0; padding: 0;
+ height: 100%;
+}
+body {
+ font-family: Helvetica Neue, Helvetica, Arial;
+ font-size: 14px;
+ color:#333;
+}
+.small { font-size: 12px; }
+*, *:after, *:before {
+ -webkit-box-sizing:border-box;
+ -moz-box-sizing:border-box;
+ box-sizing:border-box;
+ }
+h1 { font-size: 20px; margin: 0;}
+h2 { font-size: 14px; }
+pre {
+ font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
+ margin: 0;
+ padding: 0;
+ -moz-tab-size: 2;
+ -o-tab-size: 2;
+ tab-size: 2;
+}
+a { color:#0074D9; text-decoration:none; }
+a:hover { text-decoration:underline; }
+.strong { font-weight: bold; }
+.space-top1 { padding: 10px 0 0 0; }
+.pad2y { padding: 20px 0; }
+.pad1y { padding: 10px 0; }
+.pad2x { padding: 0 20px; }
+.pad2 { padding: 20px; }
+.pad1 { padding: 10px; }
+.space-left2 { padding-left:55px; }
+.space-right2 { padding-right:20px; }
+.center { text-align:center; }
+.clearfix { display:block; }
+.clearfix:after {
+ content:'';
+ display:block;
+ height:0;
+ clear:both;
+ visibility:hidden;
+ }
+.fl { float: left; }
+@media only screen and (max-width:640px) {
+ .col3 { width:100%; max-width:100%; }
+ .hide-mobile { display:none!important; }
+}
+
+.quiet {
+ color: #7f7f7f;
+ color: rgba(0,0,0,0.5);
+}
+.quiet a { opacity: 0.7; }
+
+.fraction {
+ font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
+ font-size: 10px;
+ color: #555;
+ background: #E8E8E8;
+ padding: 4px 5px;
+ border-radius: 3px;
+ vertical-align: middle;
+}
+
+div.path a:link, div.path a:visited { color: #333; }
+table.coverage {
+ border-collapse: collapse;
+ margin: 10px 0 0 0;
+ padding: 0;
+}
+
+table.coverage td {
+ margin: 0;
+ padding: 0;
+ vertical-align: top;
+}
+table.coverage td.line-count {
+ text-align: right;
+ padding: 0 5px 0 20px;
+}
+table.coverage td.line-coverage {
+ text-align: right;
+ padding-right: 10px;
+ min-width:20px;
+}
+
+table.coverage td span.cline-any {
+ display: inline-block;
+ padding: 0 5px;
+ width: 100%;
+}
+.missing-if-branch {
+ display: inline-block;
+ margin-right: 5px;
+ border-radius: 3px;
+ position: relative;
+ padding: 0 4px;
+ background: #333;
+ color: yellow;
+}
+
+.skip-if-branch {
+ display: none;
+ margin-right: 10px;
+ position: relative;
+ padding: 0 4px;
+ background: #ccc;
+ color: white;
+}
+.missing-if-branch .typ, .skip-if-branch .typ {
+ color: inherit !important;
+}
+.coverage-summary {
+ border-collapse: collapse;
+ width: 100%;
+}
+.coverage-summary tr { border-bottom: 1px solid #bbb; }
+.keyline-all { border: 1px solid #ddd; }
+.coverage-summary td, .coverage-summary th { padding: 10px; }
+.coverage-summary tbody { border: 1px solid #bbb; }
+.coverage-summary td { border-right: 1px solid #bbb; }
+.coverage-summary td:last-child { border-right: none; }
+.coverage-summary th {
+ text-align: left;
+ font-weight: normal;
+ white-space: nowrap;
+}
+.coverage-summary th.file { border-right: none !important; }
+.coverage-summary th.pct { }
+.coverage-summary th.pic,
+.coverage-summary th.abs,
+.coverage-summary td.pct,
+.coverage-summary td.abs { text-align: right; }
+.coverage-summary td.file { white-space: nowrap; }
+.coverage-summary td.pic { min-width: 120px !important; }
+.coverage-summary tfoot td { }
+
+.coverage-summary .sorter {
+ height: 10px;
+ width: 7px;
+ display: inline-block;
+ margin-left: 0.5em;
+ background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
+}
+.coverage-summary .sorted .sorter {
+ background-position: 0 -20px;
+}
+.coverage-summary .sorted-desc .sorter {
+ background-position: 0 -10px;
+}
+.status-line { height: 10px; }
+/* yellow */
+.cbranch-no { background: yellow !important; color: #111; }
+/* dark red */
+.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
+.low .chart { border:1px solid #C21F39 }
+.highlighted,
+.highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{
+ background: #C21F39 !important;
+}
+/* medium red */
+.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
+/* light red */
+.low, .cline-no { background:#FCE1E5 }
+/* light green */
+.high, .cline-yes { background:rgb(230,245,208) }
+/* medium green */
+.cstat-yes { background:rgb(161,215,106) }
+/* dark green */
+.status-line.high, .high .cover-fill { background:rgb(77,146,33) }
+.high .chart { border:1px solid rgb(77,146,33) }
+/* dark yellow (gold) */
+.status-line.medium, .medium .cover-fill { background: #f9cd0b; }
+.medium .chart { border:1px solid #f9cd0b; }
+/* light yellow */
+.medium { background: #fff4c2; }
+
+.cstat-skip { background: #ddd; color: #111; }
+.fstat-skip { background: #ddd; color: #111 !important; }
+.cbranch-skip { background: #ddd !important; color: #111; }
+
+span.cline-neutral { background: #eaeaea; }
+
+.coverage-summary td.empty {
+ opacity: .5;
+ padding-top: 4px;
+ padding-bottom: 4px;
+ line-height: 1;
+ color: #888;
+}
+
+.cover-fill, .cover-empty {
+ display:inline-block;
+ height: 12px;
+}
+.chart {
+ line-height: 0;
+}
+.cover-empty {
+ background: white;
+}
+.cover-full {
+ border-right: none !important;
+}
+pre.prettyprint {
+ border: none !important;
+ padding: 0 !important;
+ margin: 0 !important;
+}
+.com { color: #999 !important; }
+.ignore-none { color: #999; font-weight: normal; }
+
+.wrapper {
+ min-height: 100%;
+ height: auto !important;
+ height: 100%;
+ margin: 0 auto -48px;
+}
+.footer, .push {
+ height: 48px;
+}
diff --git a/backend/node_modules/kareem/coverage/lcov-report/block-navigation.js b/backend/node_modules/kareem/coverage/lcov-report/block-navigation.js
new file mode 100644
index 0000000..cc12130
--- /dev/null
+++ b/backend/node_modules/kareem/coverage/lcov-report/block-navigation.js
@@ -0,0 +1,87 @@
+/* eslint-disable */
+var jumpToCode = (function init() {
+ // Classes of code we would like to highlight in the file view
+ var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
+
+ // Elements to highlight in the file listing view
+ var fileListingElements = ['td.pct.low'];
+
+ // We don't want to select elements that are direct descendants of another match
+ var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
+
+ // Selecter that finds elements on the page to which we can jump
+ var selector =
+ fileListingElements.join(', ') +
+ ', ' +
+ notSelector +
+ missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
+
+ // The NodeList of matching elements
+ var missingCoverageElements = document.querySelectorAll(selector);
+
+ var currentIndex;
+
+ function toggleClass(index) {
+ missingCoverageElements
+ .item(currentIndex)
+ .classList.remove('highlighted');
+ missingCoverageElements.item(index).classList.add('highlighted');
+ }
+
+ function makeCurrent(index) {
+ toggleClass(index);
+ currentIndex = index;
+ missingCoverageElements.item(index).scrollIntoView({
+ behavior: 'smooth',
+ block: 'center',
+ inline: 'center'
+ });
+ }
+
+ function goToPrevious() {
+ var nextIndex = 0;
+ if (typeof currentIndex !== 'number' || currentIndex === 0) {
+ nextIndex = missingCoverageElements.length - 1;
+ } else if (missingCoverageElements.length > 1) {
+ nextIndex = currentIndex - 1;
+ }
+
+ makeCurrent(nextIndex);
+ }
+
+ function goToNext() {
+ var nextIndex = 0;
+
+ if (
+ typeof currentIndex === 'number' &&
+ currentIndex < missingCoverageElements.length - 1
+ ) {
+ nextIndex = currentIndex + 1;
+ }
+
+ makeCurrent(nextIndex);
+ }
+
+ return function jump(event) {
+ if (
+ document.getElementById('fileSearch') === document.activeElement &&
+ document.activeElement != null
+ ) {
+ // if we're currently focused on the search input, we don't want to navigate
+ return;
+ }
+
+ switch (event.which) {
+ case 78: // n
+ case 74: // j
+ goToNext();
+ break;
+ case 66: // b
+ case 75: // k
+ case 80: // p
+ goToPrevious();
+ break;
+ }
+ };
+})();
+window.addEventListener('keydown', jumpToCode);
diff --git a/backend/node_modules/kareem/coverage/lcov-report/favicon.png b/backend/node_modules/kareem/coverage/lcov-report/favicon.png
new file mode 100644
index 0000000..c1525b8
Binary files /dev/null and b/backend/node_modules/kareem/coverage/lcov-report/favicon.png differ
diff --git a/backend/node_modules/kareem/coverage/lcov-report/index.html b/backend/node_modules/kareem/coverage/lcov-report/index.html
new file mode 100644
index 0000000..a67a765
--- /dev/null
+++ b/backend/node_modules/kareem/coverage/lcov-report/index.html
@@ -0,0 +1,116 @@
+
+
+
+
+
+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +
+ +| File | ++ | Statements | ++ | Branches | ++ | Functions | ++ | Lines | ++ |
|---|---|---|---|---|---|---|---|---|---|
| index.js | +
+
+ |
+ 96.66% | +232/240 | +90.08% | +109/121 | +100% | +30/30 | +96.56% | +225/233 | +
+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +
+ +| 1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 +506 +507 | + + + + + +62x +62x + + +1x +6x +3x + + +3x + + +1x +12x +6x + + +6x + + + + + + + + + +1x +27x +27x +27x +27x + +27x +3x + + +24x +24x +33x +27x +27x +27x +27x +27x + +27x +27x +27x +19x + + +19x + + +27x +27x +27x + + +27x + + +9x +3x +3x + +6x + + +6x +6x + +2x + + + +2x + + + + +16x + +16x +3x + + + + + + + + + + +1x +4x +4x + +4x +4x + + + + + + + + + + + +1x +27x +27x + +27x +27x +6x + + +27x +1x + + +1x + + +26x +41x +41x +41x +41x +41x +40x +40x +40x + + + +41x +1x +1x +1x + + + + + +41x +41x +41x + +41x +24x +12x + +12x + + + +41x +14x +8x +8x +8x +1x +7x + +6x + + +5x + + + +5x + + +6x + + +27x + +1x + +26x +26x +26x +26x +3x +23x + +18x + + +7x +2x +2x + +5x +5x + + +19x +2x +2x + + + + + +26x +11x + + +15x + + + + + + + + + +1x +5x +5x + +5x +6x +6x +2x + + + +5x + + + + + + + + +1x +2x +2x +2x + +2x + +2x + +2x + + + + + + + + + + + + +1x + +17x +17x +17x + +7x +2x +2x + +5x + + + +12x +10x + + +9x + +7x + + + + + + + +1x +2x + +2x +2x +4x +6x + + +4x +1x +1x + + +3x + + +2x +2x +4x +6x + + +4x +1x +1x + + +3x + + +2x + + + + + + + +1x +2x + + + + + + + + + + +1x +1x +1x + + + +1x +1x +1x + + + + + + + + + + + + +1x +51x +43x +43x +8x +1x + + +51x +51x + +51x +1x + + +50x +2x + +48x + + +50x + + + + + + + + + + + +1x +60x + +60x +52x +52x +52x + + +60x +1x + + +59x +2x + +57x + +59x +59x + + + + + + + + + + + +1x +1x +1x +1x +1x + +1x + + + + + + +1x +4x + +4x +6x +6x + +4x +5x + + +4x + + + + + + + + +1x +1x +1x + +1x +1x +1x + +1x +1x +1x + +1x +1x +1x +1x +1x + + +1x + + + +61x + + + +41x +2x + +39x + + +1x + | 'use strict';
+
+/**
+ * Create a new instance
+ */
+function Kareem() {
+ this._pres = new Map();
+ this._posts = new Map();
+}
+
+Kareem.skipWrappedFunction = function skipWrappedFunction() {
+ if (!(this instanceof Kareem.skipWrappedFunction)) {
+ return new Kareem.skipWrappedFunction(...arguments);
+ }
+
+ this.args = [...arguments];
+};
+
+Kareem.overwriteResult = function overwriteResult() {
+ if (!(this instanceof Kareem.overwriteResult)) {
+ return new Kareem.overwriteResult(...arguments);
+ }
+
+ this.args = [...arguments];
+};
+
+/**
+ * Execute all "pre" hooks for "name"
+ * @param {String} name The hook name to execute
+ * @param {*} context Overwrite the "this" for the hook
+ * @param {Array|Function} args arguments passed to the pre hooks
+ * @returns {void}
+ */
+Kareem.prototype.execPre = async function execPre(name, context, args) {
+ const pres = this._pres.get(name) || [];
+ const numPres = pres.length;
+ const $args = args;
+ let skipWrappedFunction = null;
+
+ if (!numPres) {
+ return;
+ }
+
+ const asyncPrePromises = [];
+ for (const pre of pres) {
+ if (pre.fn.length > 0) {
+ let resolve = null;
+ let reject = null;
+ const cbPromise = new Promise((_resolve, _reject) => {
+ resolve = _resolve;
+ reject = _reject;
+ });
+ const args = [(err) => err ? reject(err) : resolve()];
+ const _args = [null].concat($args);
+ for (let i = 1; i < _args.length; ++i) {
+ Iif (i === _args.length - 1 && typeof _args[i] === 'function') {
+ continue; // skip callbacks to avoid accidentally calling the callback from a hook
+ }
+ args.push(_args[i]);
+ }
+
+ try {
+ const maybePromiseLike = pre.fn.apply(context, args);
+ Iif (isPromiseLike(maybePromiseLike)) {
+ await maybePromiseLike;
+ } else {
+ await cbPromise;
+ }
+ } catch (error) {
+ if (error instanceof Kareem.skipWrappedFunction) {
+ skipWrappedFunction = error;
+ continue;
+ }
+ throw error;
+ }
+ } else {
+ try {
+ await pre.fn.call(context);
+ } catch (error) {
+ Iif (error instanceof Kareem.skipWrappedFunction) {
+ skipWrappedFunction = error;
+ continue;
+ }
+ throw error;
+ }
+ }
+ }
+
+ await Promise.all(asyncPrePromises);
+
+ if (skipWrappedFunction) {
+ throw skipWrappedFunction;
+ }
+};
+
+/**
+ * Execute all "pre" hooks for "name" synchronously
+ * @param {String} name The hook name to execute
+ * @param {*} context Overwrite the "this" for the hook
+ * @param {Array} [args] Apply custom arguments to the hook
+ * @returns {void}
+ */
+Kareem.prototype.execPreSync = function(name, context, args) {
+ const pres = this._pres.get(name) || [];
+ const numPres = pres.length;
+
+ for (let i = 0; i < numPres; ++i) {
+ pres[i].fn.apply(context, args || []);
+ }
+};
+
+/**
+ * Execute all "post" hooks for "name"
+ * @param {String} name The hook name to execute
+ * @param {*} context Overwrite the "this" for the hook
+ * @param {Array|Function} args Apply custom arguments to the hook
+ * @param {*} options Optional options or directly the callback
+ * @returns {void}
+ */
+Kareem.prototype.execPost = async function execPost(name, context, args, options) {
+ const posts = this._posts.get(name) || [];
+ const numPosts = posts.length;
+
+ let firstError = null;
+ if (options && options.error) {
+ firstError = options.error;
+ }
+
+ if (!numPosts) {
+ Iif (firstError != null) {
+ throw firstError;
+ }
+ return args;
+ }
+
+ for (const currentPost of posts) {
+ const post = currentPost.fn;
+ let numArgs = 0;
+ const newArgs = [];
+ const argLength = args.length;
+ for (let i = 0; i < argLength; ++i) {
+ Eif (!args[i] || !args[i]._kareemIgnore) {
+ numArgs += 1;
+ newArgs.push(args[i]);
+ }
+ }
+ // If numCallbackParams set, fill in the rest with null to enforce consistent number of args
+ if (options?.numCallbackParams != null) {
+ numArgs = options.numCallbackParams;
+ for (let i = newArgs.length; i < numArgs; ++i) {
+ newArgs.push(null);
+ }
+ }
+
+ let resolve;
+ let reject;
+ const cbPromise = new Promise((_resolve, _reject) => {
+ resolve = _resolve;
+ reject = _reject;
+ });
+ newArgs.push(function nextCallback(err) {
+ if (err) {
+ reject(err);
+ } else {
+ resolve();
+ }
+ });
+
+ if (firstError) {
+ if (isErrorHandlingMiddleware(currentPost, numArgs)) {
+ try {
+ const res = post.apply(context, [firstError].concat(newArgs));
+ if (isPromiseLike(res)) {
+ await res;
+ } else if (post.length === numArgs + 2) {
+ // `numArgs + 2` because we added the error and the callback
+ await cbPromise;
+ }
+ } catch (error) {
+ Iif (error instanceof Kareem.overwriteResult) {
+ args = error.args;
+ continue;
+ }
+ firstError = error;
+ }
+ } else {
+ continue;
+ }
+ } else {
+ if (isErrorHandlingMiddleware(currentPost, numArgs)) {
+ // Skip error handlers if no error
+ continue;
+ } else {
+ let res = null;
+ try {
+ res = post.apply(context, newArgs);
+ if (isPromiseLike(res)) {
+ res = await res;
+ } else if (post.length === numArgs + 1) {
+ // If post function takes a callback, wait for the post function to call the callback
+ res = await cbPromise;
+ }
+ } catch (error) {
+ if (error instanceof Kareem.overwriteResult) {
+ args = error.args;
+ continue;
+ }
+ firstError = error;
+ continue;
+ }
+
+ if (res instanceof Kareem.overwriteResult) {
+ args = res.args;
+ continue;
+ }
+ }
+ }
+ }
+
+ if (firstError != null) {
+ throw firstError;
+ }
+
+ return args;
+};
+
+/**
+ * Execute all "post" hooks for "name" synchronously
+ * @param {String} name The hook name to execute
+ * @param {*} context Overwrite the "this" for the hook
+ * @param {Array|Function} args Apply custom arguments to the hook
+ * @returns {Array} The used arguments
+ */
+Kareem.prototype.execPostSync = function(name, context, args) {
+ const posts = this._posts.get(name) || [];
+ const numPosts = posts.length;
+
+ for (let i = 0; i < numPosts; ++i) {
+ const res = posts[i].fn.apply(context, args || []);
+ if (res instanceof Kareem.overwriteResult) {
+ args = res.args;
+ }
+ }
+
+ return args;
+};
+
+/**
+ * Create a synchronous wrapper for "fn"
+ * @param {String} name The name of the hook
+ * @param {Function} fn The function to wrap
+ * @returns {Function} The wrapped function
+ */
+Kareem.prototype.createWrapperSync = function(name, fn) {
+ const _this = this;
+ return function syncWrapper() {
+ _this.execPreSync(name, this, arguments);
+
+ const toReturn = fn.apply(this, arguments);
+
+ const result = _this.execPostSync(name, this, [toReturn]);
+
+ return result[0];
+ };
+};
+
+/**
+ * Executes pre hooks, followed by the wrapped function, followed by post hooks.
+ * @param {String} name The name of the hook
+ * @param {Function} fn The function for the hook
+ * @param {*} context Overwrite the "this" for the hook
+ * @param {Array} args Apply custom arguments to the hook
+ * @param {Object} options Additional options for the hook
+ * @returns {void}
+ */
+Kareem.prototype.wrap = async function wrap(name, fn, context, args, options) {
+ let ret;
+ let skipWrappedFunction = false;
+ try {
+ await this.execPre(name, context, args);
+ } catch (error) {
+ if (error instanceof Kareem.skipWrappedFunction) {
+ ret = error.args;
+ skipWrappedFunction = true;
+ } else {
+ await this.execPost(name, context, args, { ...options, error });
+ }
+ }
+
+ if (!skipWrappedFunction) {
+ ret = await fn.apply(context, args);
+ }
+
+ ret = await this.execPost(name, context, [ret], options);
+
+ return ret[0];
+};
+
+/**
+ * Filter current instance for something specific and return the filtered clone
+ * @param {Function} fn The filter function
+ * @returns {Kareem} The cloned and filtered instance
+ */
+Kareem.prototype.filter = function(fn) {
+ const clone = this.clone();
+
+ const pres = Array.from(clone._pres.keys());
+ for (const name of pres) {
+ const hooks = this._pres.get(name).
+ map(h => Object.assign({}, h, { name: name })).
+ filter(fn);
+
+ if (hooks.length === 0) {
+ clone._pres.delete(name);
+ continue;
+ }
+
+ clone._pres.set(name, hooks);
+ }
+
+ const posts = Array.from(clone._posts.keys());
+ for (const name of posts) {
+ const hooks = this._posts.get(name).
+ map(h => Object.assign({}, h, { name: name })).
+ filter(fn);
+
+ if (hooks.length === 0) {
+ clone._posts.delete(name);
+ continue;
+ }
+
+ clone._posts.set(name, hooks);
+ }
+
+ return clone;
+};
+
+/**
+ * Check for a "name" to exist either in pre or post hooks
+ * @param {String} name The name of the hook
+ * @returns {Boolean} "true" if found, "false" otherwise
+ */
+Kareem.prototype.hasHooks = function(name) {
+ return this._pres.has(name) || this._posts.has(name);
+};
+
+/**
+ * Create a Wrapper for "fn" on "name" and return the wrapped function
+ * @param {String} name The name of the hook
+ * @param {Function} fn The function to wrap
+ * @param {*} context Overwrite the "this" for the hook
+ * @param {Object} [options]
+ * @returns {Function} The wrapped function
+ */
+Kareem.prototype.createWrapper = function(name, fn, context, options) {
+ const _this = this;
+ Iif (!this.hasHooks(name)) {
+ // Fast path: if there's no hooks for this function, just return the function
+ return fn;
+ }
+ return function kareemWrappedFunction() {
+ const _context = context || this;
+ return _this.wrap(name, fn, _context, Array.from(arguments), options);
+ };
+};
+
+/**
+ * Register a new hook for "pre"
+ * @param {String} name The name of the hook
+ * @param {Object} [options]
+ * @param {Function} fn The function to register for "name"
+ * @param {never} error Unused
+ * @param {Boolean} [unshift] Wheter to "push" or to "unshift" the new hook
+ * @returns {Kareem}
+ */
+Kareem.prototype.pre = function(name, options, fn, error, unshift) {
+ if (typeof options === 'function') {
+ fn = options;
+ options = {};
+ } else if (options == null) {
+ options = {};
+ }
+
+ const pres = this._pres.get(name) || [];
+ this._pres.set(name, pres);
+
+ if (typeof fn !== 'function') {
+ throw new Error('pre() requires a function, got "' + typeof fn + '"');
+ }
+
+ if (unshift) {
+ pres.unshift(Object.assign({}, options, { fn: fn }));
+ } else {
+ pres.push(Object.assign({}, options, { fn: fn }));
+ }
+
+ return this;
+};
+
+/**
+ * Register a new hook for "post"
+ * @param {String} name The name of the hook
+ * @param {Object} [options]
+ * @param {Boolean} [options.errorHandler] Whether this is an error handler
+ * @param {Function} fn The function to register for "name"
+ * @param {Boolean} [unshift] Wheter to "push" or to "unshift" the new hook
+ * @returns {Kareem}
+ */
+Kareem.prototype.post = function(name, options, fn, unshift) {
+ const posts = this._posts.get(name) || [];
+
+ if (typeof options === 'function') {
+ unshift = !!fn;
+ fn = options;
+ options = {};
+ }
+
+ if (typeof fn !== 'function') {
+ throw new Error('post() requires a function, got "' + typeof fn + '"');
+ }
+
+ if (unshift) {
+ posts.unshift(Object.assign({}, options, { fn: fn }));
+ } else {
+ posts.push(Object.assign({}, options, { fn: fn }));
+ }
+ this._posts.set(name, posts);
+ return this;
+};
+
+/**
+ * Register a new error handler for "name"
+ * @param {String} name The name of the hook
+ * @param {Object} [options]
+ * @param {Function} fn The function to register for "name"
+ * @param {Boolean} [unshift] Wheter to "push" or to "unshift" the new hook
+ * @returns {Kareem}
+ */
+
+Kareem.prototype.postError = function postError(name, options, fn, unshift) {
+ Eif (typeof options === 'function') {
+ unshift = !!fn;
+ fn = options;
+ options = {};
+ }
+ return this.post(name, { ...options, errorHandler: true }, fn, unshift);
+};
+
+/**
+ * Clone the current instance
+ * @returns {Kareem} The cloned instance
+ */
+Kareem.prototype.clone = function() {
+ const n = new Kareem();
+
+ for (const key of this._pres.keys()) {
+ const clone = this._pres.get(key).slice();
+ n._pres.set(key, clone);
+ }
+ for (const key of this._posts.keys()) {
+ n._posts.set(key, this._posts.get(key).slice());
+ }
+
+ return n;
+};
+
+/**
+ * Merge "other" into self or "clone"
+ * @param {Kareem} other The instance to merge with
+ * @param {Kareem} [clone] The instance to merge onto (if not defined, using "this")
+ * @returns {Kareem} The merged instance
+ */
+Kareem.prototype.merge = function(other, clone) {
+ clone = arguments.length === 1 ? true : clone;
+ const ret = clone ? this.clone() : this;
+
+ for (const key of other._pres.keys()) {
+ const sourcePres = ret._pres.get(key) || [];
+ const deduplicated = other._pres.get(key).
+ // Deduplicate based on `fn`
+ filter(p => sourcePres.map(_p => _p.fn).indexOf(p.fn) === -1);
+ const combined = sourcePres.concat(deduplicated);
+ ret._pres.set(key, combined);
+ }
+ for (const key of other._posts.keys()) {
+ const sourcePosts = ret._posts.get(key) || [];
+ const deduplicated = other._posts.get(key).
+ filter(p => sourcePosts.indexOf(p) === -1);
+ ret._posts.set(key, sourcePosts.concat(deduplicated));
+ }
+
+ return ret;
+};
+
+function isPromiseLike(v) {
+ return (typeof v === 'object' && v !== null && typeof v.then === 'function');
+}
+
+function isErrorHandlingMiddleware(post, numArgs) {
+ if (post.errorHandler) {
+ return true;
+ }
+ return post.fn.length === numArgs + 2;
+}
+
+module.exports = Kareem;
+ |