2 Achegas a1239955ca ... e8c075d835

Autor SHA1 Mensaxe Data
  Emmanuil e8c075d835 done %!s(int64=4) %!d(string=hai) anos
  Emmanuil 67a2fbe5b9 done %!s(int64=4) %!d(string=hai) anos
Modificáronse 100 ficheiros con 2294 adicións e 0 borrados
  1. BIN=BIN
      chat-server.rar
  2. 40 0
      chat-server/chat/hw.txt
  3. BIN=BIN
      chat-server/chat/image/0.06mixxa3slhk
  4. BIN=BIN
      chat-server/chat/image/0.22l7nynaiwc
  5. BIN=BIN
      chat-server/chat/image/0.269k2rbgmze
  6. BIN=BIN
      chat-server/chat/image/0.3mtqe92ua63
  7. 0 0
      chat-server/chat/image/0.40e6qjae288
  8. BIN=BIN
      chat-server/chat/image/0.4l3g5f2h1p
  9. BIN=BIN
      chat-server/chat/image/0.5481hkd8rmr
  10. BIN=BIN
      chat-server/chat/image/0.6v4rplm8qnh
  11. BIN=BIN
      chat-server/chat/image/0.7zotuefomy8
  12. BIN=BIN
      chat-server/chat/image/0.80w0sga2qb6
  13. BIN=BIN
      chat-server/chat/image/0.8ub0a1hl8y7
  14. BIN=BIN
      chat-server/chat/image/0.dr6z1atf96p
  15. BIN=BIN
      chat-server/chat/image/0.eft4i9o0m19
  16. BIN=BIN
      chat-server/chat/image/0.fi9uh7gkms
  17. 0 0
      chat-server/chat/image/0.fza18yv6zsf
  18. 0 0
      chat-server/chat/image/0.gjoksjpjjfr
  19. BIN=BIN
      chat-server/chat/image/0.go2nxgfpf68
  20. 0 0
      chat-server/chat/image/0.hxwrqqsutna
  21. BIN=BIN
      chat-server/chat/image/0.i4yha08pm8
  22. BIN=BIN
      chat-server/chat/image/0.itami6muef
  23. BIN=BIN
      chat-server/chat/image/0.jyeeme834q
  24. 0 0
      chat-server/chat/image/0.kgjh2ju8y3c
  25. BIN=BIN
      chat-server/chat/image/0.lkrozrdrde
  26. BIN=BIN
      chat-server/chat/image/0.lye8di02fa
  27. BIN=BIN
      chat-server/chat/image/0.nejs602c5zq
  28. BIN=BIN
      chat-server/chat/image/0.ni2p73suwuh
  29. BIN=BIN
      chat-server/chat/image/0.ovn6d6adwm
  30. BIN=BIN
      chat-server/chat/image/0.pstvbhg9gvr
  31. BIN=BIN
      chat-server/chat/image/0.rbhdt7hiz3
  32. 0 0
      chat-server/chat/image/0.rmyajw7usit
  33. BIN=BIN
      chat-server/chat/image/0.s78xbemn98g
  34. BIN=BIN
      chat-server/chat/image/0.sif6m8bhns
  35. BIN=BIN
      chat-server/chat/image/0.srlzp4l0g5
  36. BIN=BIN
      chat-server/chat/image/0.thxe45ktzlo
  37. 0 0
      chat-server/chat/image/0.tmvx8ifonw
  38. BIN=BIN
      chat-server/chat/image/0.ttig9mahah
  39. BIN=BIN
      chat-server/chat/image/0.tv2p84hyh
  40. BIN=BIN
      chat-server/chat/image/0.twhd1o8brto
  41. 0 0
      chat-server/chat/image/0.u96nab8jhxi
  42. BIN=BIN
      chat-server/chat/image/0.ut9tcum3aac
  43. BIN=BIN
      chat-server/chat/image/0.uzebzmkyhri
  44. 0 0
      chat-server/chat/image/0.w978az6b3iq
  45. BIN=BIN
      chat-server/chat/image/0.whhc8cbcom
  46. BIN=BIN
      chat-server/chat/image/0.wlg2tvq6up
  47. BIN=BIN
      chat-server/chat/image/0.ww2ly5vv2y
  48. BIN=BIN
      chat-server/chat/image/0.x2sbod90nja
  49. BIN=BIN
      chat-server/chat/image/0.ypvuffdo14m
  50. BIN=BIN
      chat-server/chat/image/0.zgp3wlhi5og
  51. BIN=BIN
      chat-server/chat/image/16.jpg
  52. 69 0
      chat-server/chat/index.css
  53. 28 0
      chat-server/chat/index.html
  54. 208 0
      chat-server/chat/index.js
  55. 0 0
      chat-server/chat/{ _id
  56. 15 0
      chat-server/node_modules/.bin/detect-libc
  57. 17 0
      chat-server/node_modules/.bin/detect-libc.cmd
  58. 18 0
      chat-server/node_modules/.bin/detect-libc.ps1
  59. 15 0
      chat-server/node_modules/.bin/is-ci
  60. 17 0
      chat-server/node_modules/.bin/is-ci.cmd
  61. 18 0
      chat-server/node_modules/.bin/is-ci.ps1
  62. 15 0
      chat-server/node_modules/.bin/mime
  63. 17 0
      chat-server/node_modules/.bin/mime.cmd
  64. 18 0
      chat-server/node_modules/.bin/mime.ps1
  65. 15 0
      chat-server/node_modules/.bin/mkdirp
  66. 17 0
      chat-server/node_modules/.bin/mkdirp.cmd
  67. 18 0
      chat-server/node_modules/.bin/mkdirp.ps1
  68. 15 0
      chat-server/node_modules/.bin/nodemon
  69. 17 0
      chat-server/node_modules/.bin/nodemon.cmd
  70. 18 0
      chat-server/node_modules/.bin/nodemon.ps1
  71. 15 0
      chat-server/node_modules/.bin/nodetouch
  72. 17 0
      chat-server/node_modules/.bin/nodetouch.cmd
  73. 18 0
      chat-server/node_modules/.bin/nodetouch.ps1
  74. 15 0
      chat-server/node_modules/.bin/nopt
  75. 17 0
      chat-server/node_modules/.bin/nopt.cmd
  76. 18 0
      chat-server/node_modules/.bin/nopt.ps1
  77. 15 0
      chat-server/node_modules/.bin/prebuild-install
  78. 17 0
      chat-server/node_modules/.bin/prebuild-install.cmd
  79. 18 0
      chat-server/node_modules/.bin/prebuild-install.ps1
  80. 15 0
      chat-server/node_modules/.bin/rc
  81. 17 0
      chat-server/node_modules/.bin/rc.cmd
  82. 18 0
      chat-server/node_modules/.bin/rc.ps1
  83. 15 0
      chat-server/node_modules/.bin/semver
  84. 17 0
      chat-server/node_modules/.bin/semver.cmd
  85. 18 0
      chat-server/node_modules/.bin/semver.ps1
  86. 132 0
      chat-server/node_modules/@sindresorhus/is/dist/index.d.ts
  87. 245 0
      chat-server/node_modules/@sindresorhus/is/dist/index.js
  88. 1 0
      chat-server/node_modules/@sindresorhus/is/dist/index.js.map
  89. 9 0
      chat-server/node_modules/@sindresorhus/is/license
  90. 96 0
      chat-server/node_modules/@sindresorhus/is/package.json
  91. 451 0
      chat-server/node_modules/@sindresorhus/is/readme.md
  92. 21 0
      chat-server/node_modules/@szmarczak/http-timer/LICENSE
  93. 70 0
      chat-server/node_modules/@szmarczak/http-timer/README.md
  94. 75 0
      chat-server/node_modules/@szmarczak/http-timer/package.json
  95. 99 0
      chat-server/node_modules/@szmarczak/http-timer/source/index.js
  96. 21 0
      chat-server/node_modules/@types/color-name/LICENSE
  97. 16 0
      chat-server/node_modules/@types/color-name/README.md
  98. 161 0
      chat-server/node_modules/@types/color-name/index.d.ts
  99. 52 0
      chat-server/node_modules/@types/color-name/package.json
  100. 0 0
      chat-server/node_modules/abbrev/LICENSE

BIN=BIN
chat-server.rar


+ 40 - 0
chat-server/chat/hw.txt

@@ -0,0 +1,40 @@
+16.05.2020
+1) Сделать контроллер, который методом get будет отдавать одно сообщение по номеру (/message/1, /message/2) --- done
+
+2) Сделать фронт для чата используя fetch с get и post --- done
+
+3) Добавить в бэк методы put и delete для изменения и удаления сообщений. Используйте адреса вида /message/1, /message/2 --- done
+
+4) добавить на фронт удаление и изменение сообщений --- done
+
+-----------------------------------------------------------------
+
+20.05.2020
+на базе кода с занятия, доделать фронт (расположить его в public/index.html и `public/index.js и тп.):
+1) умеет визуально удалять и изменять сообщения с отправкой соответствующих запросов на сервер --- done
+
+2) умеет прикреплять файл к сообщению, используя заливку и дополнительное поле в объекте сообщения (file или image с именем залитого на сервер файла) --- done
+
+3) умеет показать картинку (или скачать файл) в сообщении на фронте --- done
+
+4) ответы на сообщения. Коль у нас свободная структура сообщения, то можно добавить кроме поля image номер сообщения, на которое это сообщение является ответом. Фронтенд должен это обеспечить:
+- запоминания на что отвечаем
+- отправку replyToId вместе с nick и message
+- при приеме сообщения с таким полем включить в ответ исходное сообщение визуально
+
+Бэк: продумать ответы на сообщения. Для этого в ответе надо хранить номер сообщения, на который отвечают.
+
+-----------------------------------------------------------------
+
+23.05.2020
+ДЗ: на базе кода предыдущего занятия и материала лекции заменить массив history на класс Message полученный с применением библиотеки mongoose на базе схемы. --- done
+
+Для поиска сообщений используйте статический метод Message.find, для создания сообщения new Message.
+Документы в mongo при использовании mongoose представлены объектами javascript. Для сохранения используйте метод save. --- done
+
+Добавьте по аналогии класс Image, который будет хранить в базе данных описание картинки. Схема может включать имя файла на диске, размер и т.п. Так же по возможности используя библиотеку sharp создайте уменьшенные версии картинок и сохраните их в других именах файлов -
+например с добавкой _NNN (NNN - размер картинки  в пикселях). В таком случае добавьте в схему документов Image поля для имен файлов уменьшенных версий. 
+
+Добавьте в Message ссылки (mongoose.Types.ObjectId) на картинки (image) и сообщение для ответа.(replyTo)
+
+приведите фронт в соответствие обновленному серверу.

BIN=BIN
chat-server/chat/image/0.06mixxa3slhk


BIN=BIN
chat-server/chat/image/0.22l7nynaiwc


BIN=BIN
chat-server/chat/image/0.269k2rbgmze


BIN=BIN
chat-server/chat/image/0.3mtqe92ua63


+ 0 - 0
chat-server/chat/image/0.40e6qjae288


BIN=BIN
chat-server/chat/image/0.4l3g5f2h1p


BIN=BIN
chat-server/chat/image/0.5481hkd8rmr


BIN=BIN
chat-server/chat/image/0.6v4rplm8qnh


BIN=BIN
chat-server/chat/image/0.7zotuefomy8


BIN=BIN
chat-server/chat/image/0.80w0sga2qb6


BIN=BIN
chat-server/chat/image/0.8ub0a1hl8y7


BIN=BIN
chat-server/chat/image/0.dr6z1atf96p


BIN=BIN
chat-server/chat/image/0.eft4i9o0m19


BIN=BIN
chat-server/chat/image/0.fi9uh7gkms


+ 0 - 0
chat-server/chat/image/0.fza18yv6zsf


+ 0 - 0
chat-server/chat/image/0.gjoksjpjjfr


BIN=BIN
chat-server/chat/image/0.go2nxgfpf68


+ 0 - 0
chat-server/chat/image/0.hxwrqqsutna


BIN=BIN
chat-server/chat/image/0.i4yha08pm8


BIN=BIN
chat-server/chat/image/0.itami6muef


BIN=BIN
chat-server/chat/image/0.jyeeme834q


+ 0 - 0
chat-server/chat/image/0.kgjh2ju8y3c


BIN=BIN
chat-server/chat/image/0.lkrozrdrde


BIN=BIN
chat-server/chat/image/0.lye8di02fa


BIN=BIN
chat-server/chat/image/0.nejs602c5zq


BIN=BIN
chat-server/chat/image/0.ni2p73suwuh


BIN=BIN
chat-server/chat/image/0.ovn6d6adwm


BIN=BIN
chat-server/chat/image/0.pstvbhg9gvr


BIN=BIN
chat-server/chat/image/0.rbhdt7hiz3


+ 0 - 0
chat-server/chat/image/0.rmyajw7usit


BIN=BIN
chat-server/chat/image/0.s78xbemn98g


BIN=BIN
chat-server/chat/image/0.sif6m8bhns


BIN=BIN
chat-server/chat/image/0.srlzp4l0g5


BIN=BIN
chat-server/chat/image/0.thxe45ktzlo


+ 0 - 0
chat-server/chat/image/0.tmvx8ifonw


BIN=BIN
chat-server/chat/image/0.ttig9mahah


BIN=BIN
chat-server/chat/image/0.tv2p84hyh


BIN=BIN
chat-server/chat/image/0.twhd1o8brto


+ 0 - 0
chat-server/chat/image/0.u96nab8jhxi


BIN=BIN
chat-server/chat/image/0.ut9tcum3aac


BIN=BIN
chat-server/chat/image/0.uzebzmkyhri


+ 0 - 0
chat-server/chat/image/0.w978az6b3iq


BIN=BIN
chat-server/chat/image/0.whhc8cbcom


BIN=BIN
chat-server/chat/image/0.wlg2tvq6up


BIN=BIN
chat-server/chat/image/0.ww2ly5vv2y


BIN=BIN
chat-server/chat/image/0.x2sbod90nja


BIN=BIN
chat-server/chat/image/0.ypvuffdo14m


BIN=BIN
chat-server/chat/image/0.zgp3wlhi5og


BIN=BIN
chat-server/chat/image/16.jpg


+ 69 - 0
chat-server/chat/index.css

@@ -0,0 +1,69 @@
+.in {
+  width: 100%;
+  font-size: 30px;
+}
+
+#btn {
+  margin-bottom: 10px;
+}
+
+#chatMessage,
+#oldMessage {
+  padding: 0 10px;
+  display: flex;
+  flex-direction: column-reverse;
+}
+
+#persone {
+  background: #535353;
+  color: white;
+  margin-bottom: 10px;
+}
+
+#nick-message {
+  display: block;
+  padding: 5px;
+  font-size: 20px;
+}
+
+#nick-message:last-child {
+  padding-left: 100px;
+}
+
+footer {
+  background: #101279;
+  width: 200px;
+  height: 200px;
+  border-radius: 20px;
+  position: absolute;
+  left: calc(50% - 100px);
+  top: calc(50% - 100px);
+  position: fixed;
+  display: none;
+}
+
+.edit-delete {
+  display: block;
+  font-size: 25px;
+  text-decoration: none;
+  padding: 10px;
+  text-align: center;
+  font-weight: bold;
+  color: white;
+  transition: all 0.5s;
+}
+
+.edit-delete:hover {
+  color: yellow;
+}
+
+#editMessage {
+  padding-top: calc(50% - 40px);
+}
+
+#image-file {
+  width: 80px;
+  height: 80px;
+  border-radius: 50%;
+  float: left;
+}

+ 28 - 0
chat-server/chat/index.html

@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Chat</title>
+    <link rel="stylesheet" href="index.css" />
+  </head>
+  <body>
+    <main>
+      <input id="nick" class="in" type="text" name="text" placeholder="nick" />
+      <input id="message" class="in" type="text" name="text" placeholder="message" />
+      <input type="file" id="image" class="in" name="image" />
+      <a href="#" id="url"></a>
+      <button id="btn" class="in" name="submit" type="submit">Send</button>
+
+      <div id="chatMessage"></div>
+      <div id="oldMessage"></div>
+    </main>
+
+    <footer>
+      <a id="editMessage" href="#" class="edit-delete">Edit</a>
+      <a id="deleteMessage" href="#" class="edit-delete">Delete</a>
+    </footer>
+
+    <script src="index.js"></script>
+  </body>
+</html>

+ 208 - 0
chat-server/chat/index.js

@@ -0,0 +1,208 @@
+const fun = () => {
+  btn.onclick = () => {
+    const img = document.createElement("img");
+    const urlImage = image.files[0].name;
+    img.id = "image-file";
+    img.src = `/image/${urlImage}`;
+
+    fetch("/image", {
+      headers: {
+        Accept: "application/json",
+        "Content-type": "application/json",
+      },
+      method: "POST",
+      body: JSON.stringify({
+        image: urlImage,
+      }),
+    });
+
+    fetch("message", {
+      headers: {
+        Accept: "application/json",
+        "Content-type": "application/json",
+      },
+      method: "POST",
+      body: JSON.stringify({
+        nick: nick.value,
+        message: message.value,
+        image: urlImage,
+      }),
+    })
+      .then((a) => a.json())
+      .then((res) => {
+        const chatMessage = document.querySelector("#chatMessage");
+        const persone = document.createElement("div");
+        const spanNick = document.createElement("span");
+        const spanMessage = document.createElement("span");
+
+        persone.id = "persone";
+        spanNick.id = "nick-message";
+        spanMessage.id = "nick-message";
+
+        spanNick.innerText = res.nick;
+        spanMessage.innerText = res.message;
+
+        persone.appendChild(img);
+        persone.appendChild(spanNick);
+        persone.appendChild(spanMessage);
+        chatMessage.appendChild(persone);
+
+        spanMessage.onclick = () => {
+          const footer = document.querySelector("footer");
+          footer.style.display = "block";
+
+          editMessage.onclick = () => {
+            spanMessage.style.background = "blue";
+            nick.value = spanNick.innerText;
+            message.value = spanMessage.innerText;
+            footer.style.display = "none";
+
+            btn.onclick = () => {
+              fetch(`/message/${res._id}`, {
+                headers: {
+                  Accept: "application/json",
+                  "Content-type": "application/json",
+                },
+                method: "PUT",
+                body: JSON.stringify({
+                  nick: nick.value,
+                  message: nick.value,
+                }),
+              })
+                .then((v) => v.json())
+                .then(() => {
+                  spanNick.innerText = nick.value;
+                  spanMessage.innerText = nick.value;
+                  spanMessage.style.background = "none";
+                  fun();
+                });
+            };
+          };
+
+          deleteMessage.onclick = () => {
+            fetch(`/image/${res.image}`, {
+              headers: {
+                Accept: "application/json",
+                "Content-type": "application/json",
+              },
+              method: "DELETE",
+            });
+            fetch(`/message/${res._id}`, {
+              headers: {
+                Accept: "application/json",
+                "Content-type": "application/json",
+              },
+              method: "DELETE",
+            })
+              .then((d) => d.json())
+              .then(() => {
+                spanNick.innerText = null;
+                spanMessage.innerText = null;
+                spanMessage.style.background = "none";
+                persone.style.background = "none";
+                footer.style.display = "none";
+                chatMessage.removeChild(persone);
+              });
+          };
+        };
+      });
+  };
+};
+fun();
+
+function getMsg() {
+  fetch("/message")
+    .then((res) => res.json())
+    .then((data) => {
+      for (const key of data) {
+        const oldMessage = document.querySelector("#oldMessage");
+        const persone = document.createElement("div");
+        const spanNick = document.createElement("span");
+        const spanMessage = document.createElement("span");
+        const img = document.createElement("img");
+        const urlImage = key.image;
+        img.id = "image-file";
+        img.src = `/image/${urlImage}`;
+
+        persone.id = "persone";
+        spanNick.id = "nick-message";
+        spanMessage.id = "nick-message";
+
+        spanNick.innerText = key.nick;
+        spanMessage.innerText = key.message;
+
+        persone.appendChild(img);
+        persone.appendChild(spanNick);
+        persone.appendChild(spanMessage);
+        oldMessage.appendChild(persone);
+
+        spanMessage.onclick = () => {
+          const footer = document.querySelector("footer");
+          footer.style.display = "block";
+
+          editMessage.onclick = () => {
+            spanMessage.style.background = "blue";
+            key.nick = spanNick.innerText;
+            key.message = spanMessage.innerText;
+            footer.style.display = "none";
+
+            btn.onclick = () => {
+              fetch(`/message/${key._id}`, {
+                headers: {
+                  Accept: "application/json",
+                  "Content-type": "application/json",
+                },
+                method: "PUT",
+                body: JSON.stringify({
+                  nick: nick.value,
+                  message: nick.value,
+                }),
+              })
+                .then((v) => v.json())
+                .then(() => {
+                  spanNick.innerText = nick.value;
+                  spanMessage.innerText = nick.value;
+                  spanMessage.style.background = "none";
+                  fun();
+                });
+            };
+          };
+
+          deleteMessage.onclick = () => {
+            fetch(`/message/${key._id}`, {
+              headers: {
+                Accept: "application/json",
+                "Content-type": "application/json",
+              },
+              method: "DELETE",
+            })
+              .then((d) => d.json())
+              .then(() => {
+                spanNick.innerText = null;
+                spanMessage.innerText = null;
+                spanMessage.style.background = "none";
+                persone.style.background = "none";
+                footer.style.display = "none";
+                oldMessage.removeChild(persone);
+              });
+          };
+        };
+      }
+    });
+}
+getMsg();
+
+// image.onchange = async () => {
+//   url.innerHTML = url.href =
+//     "/" +
+//     (await (
+//       await fetch("/image", {
+//         method: "POST",
+//         body: image.files[0],
+//       })
+//     ).text());
+// };
+
+image.onchange = () => {
+  url.innerHTML = url.href = `/image/${image.files[0].name}`;
+};

+ 0 - 0
chat-server/chat/{ _id


+ 15 - 0
chat-server/node_modules/.bin/detect-libc

@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  "$basedir/node"  "$basedir/../detect-libc/bin/detect-libc.js" "$@"
+  ret=$?
+else 
+  node  "$basedir/../detect-libc/bin/detect-libc.js" "$@"
+  ret=$?
+fi
+exit $ret

+ 17 - 0
chat-server/node_modules/.bin/detect-libc.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%"  "%dp0%\..\detect-libc\bin\detect-libc.js" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b

+ 18 - 0
chat-server/node_modules/.bin/detect-libc.ps1

@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  & "$basedir/node$exe"  "$basedir/../detect-libc/bin/detect-libc.js" $args
+  $ret=$LASTEXITCODE
+} else {
+  & "node$exe"  "$basedir/../detect-libc/bin/detect-libc.js" $args
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 15 - 0
chat-server/node_modules/.bin/is-ci

@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  "$basedir/node"  "$basedir/../is-ci/bin.js" "$@"
+  ret=$?
+else 
+  node  "$basedir/../is-ci/bin.js" "$@"
+  ret=$?
+fi
+exit $ret

+ 17 - 0
chat-server/node_modules/.bin/is-ci.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%"  "%dp0%\..\is-ci\bin.js" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b

+ 18 - 0
chat-server/node_modules/.bin/is-ci.ps1

@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  & "$basedir/node$exe"  "$basedir/../is-ci/bin.js" $args
+  $ret=$LASTEXITCODE
+} else {
+  & "node$exe"  "$basedir/../is-ci/bin.js" $args
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 15 - 0
chat-server/node_modules/.bin/mime

@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  "$basedir/node"  "$basedir/../mime/cli.js" "$@"
+  ret=$?
+else 
+  node  "$basedir/../mime/cli.js" "$@"
+  ret=$?
+fi
+exit $ret

+ 17 - 0
chat-server/node_modules/.bin/mime.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%"  "%dp0%\..\mime\cli.js" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b

+ 18 - 0
chat-server/node_modules/.bin/mime.ps1

@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  & "$basedir/node$exe"  "$basedir/../mime/cli.js" $args
+  $ret=$LASTEXITCODE
+} else {
+  & "node$exe"  "$basedir/../mime/cli.js" $args
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 15 - 0
chat-server/node_modules/.bin/mkdirp

@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  "$basedir/node"  "$basedir/../mkdirp/bin/cmd.js" "$@"
+  ret=$?
+else 
+  node  "$basedir/../mkdirp/bin/cmd.js" "$@"
+  ret=$?
+fi
+exit $ret

+ 17 - 0
chat-server/node_modules/.bin/mkdirp.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%"  "%dp0%\..\mkdirp\bin\cmd.js" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b

+ 18 - 0
chat-server/node_modules/.bin/mkdirp.ps1

@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  & "$basedir/node$exe"  "$basedir/../mkdirp/bin/cmd.js" $args
+  $ret=$LASTEXITCODE
+} else {
+  & "node$exe"  "$basedir/../mkdirp/bin/cmd.js" $args
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 15 - 0
chat-server/node_modules/.bin/nodemon

@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  "$basedir/node"  "$basedir/../nodemon/bin/nodemon.js" "$@"
+  ret=$?
+else 
+  node  "$basedir/../nodemon/bin/nodemon.js" "$@"
+  ret=$?
+fi
+exit $ret

+ 17 - 0
chat-server/node_modules/.bin/nodemon.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%"  "%dp0%\..\nodemon\bin\nodemon.js" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b

+ 18 - 0
chat-server/node_modules/.bin/nodemon.ps1

@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  & "$basedir/node$exe"  "$basedir/../nodemon/bin/nodemon.js" $args
+  $ret=$LASTEXITCODE
+} else {
+  & "node$exe"  "$basedir/../nodemon/bin/nodemon.js" $args
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 15 - 0
chat-server/node_modules/.bin/nodetouch

@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  "$basedir/node"  "$basedir/../touch/bin/nodetouch.js" "$@"
+  ret=$?
+else 
+  node  "$basedir/../touch/bin/nodetouch.js" "$@"
+  ret=$?
+fi
+exit $ret

+ 17 - 0
chat-server/node_modules/.bin/nodetouch.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%"  "%dp0%\..\touch\bin\nodetouch.js" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b

+ 18 - 0
chat-server/node_modules/.bin/nodetouch.ps1

@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  & "$basedir/node$exe"  "$basedir/../touch/bin/nodetouch.js" $args
+  $ret=$LASTEXITCODE
+} else {
+  & "node$exe"  "$basedir/../touch/bin/nodetouch.js" $args
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 15 - 0
chat-server/node_modules/.bin/nopt

@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  "$basedir/node"  "$basedir/../nopt/bin/nopt.js" "$@"
+  ret=$?
+else 
+  node  "$basedir/../nopt/bin/nopt.js" "$@"
+  ret=$?
+fi
+exit $ret

+ 17 - 0
chat-server/node_modules/.bin/nopt.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%"  "%dp0%\..\nopt\bin\nopt.js" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b

+ 18 - 0
chat-server/node_modules/.bin/nopt.ps1

@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  & "$basedir/node$exe"  "$basedir/../nopt/bin/nopt.js" $args
+  $ret=$LASTEXITCODE
+} else {
+  & "node$exe"  "$basedir/../nopt/bin/nopt.js" $args
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 15 - 0
chat-server/node_modules/.bin/prebuild-install

@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  "$basedir/node"  "$basedir/../prebuild-install/bin.js" "$@"
+  ret=$?
+else 
+  node  "$basedir/../prebuild-install/bin.js" "$@"
+  ret=$?
+fi
+exit $ret

+ 17 - 0
chat-server/node_modules/.bin/prebuild-install.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%"  "%dp0%\..\prebuild-install\bin.js" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b

+ 18 - 0
chat-server/node_modules/.bin/prebuild-install.ps1

@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  & "$basedir/node$exe"  "$basedir/../prebuild-install/bin.js" $args
+  $ret=$LASTEXITCODE
+} else {
+  & "node$exe"  "$basedir/../prebuild-install/bin.js" $args
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 15 - 0
chat-server/node_modules/.bin/rc

@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  "$basedir/node"  "$basedir/../rc/cli.js" "$@"
+  ret=$?
+else 
+  node  "$basedir/../rc/cli.js" "$@"
+  ret=$?
+fi
+exit $ret

+ 17 - 0
chat-server/node_modules/.bin/rc.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%"  "%dp0%\..\rc\cli.js" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b

+ 18 - 0
chat-server/node_modules/.bin/rc.ps1

@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  & "$basedir/node$exe"  "$basedir/../rc/cli.js" $args
+  $ret=$LASTEXITCODE
+} else {
+  & "node$exe"  "$basedir/../rc/cli.js" $args
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 15 - 0
chat-server/node_modules/.bin/semver

@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  "$basedir/node"  "$basedir/../semver/bin/semver" "$@"
+  ret=$?
+else 
+  node  "$basedir/../semver/bin/semver" "$@"
+  ret=$?
+fi
+exit $ret

+ 17 - 0
chat-server/node_modules/.bin/semver.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%"  "%dp0%\..\semver\bin\semver" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b

+ 18 - 0
chat-server/node_modules/.bin/semver.ps1

@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  & "$basedir/node$exe"  "$basedir/../semver/bin/semver" $args
+  $ret=$LASTEXITCODE
+} else {
+  & "node$exe"  "$basedir/../semver/bin/semver" $args
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 132 - 0
chat-server/node_modules/@sindresorhus/is/dist/index.d.ts

@@ -0,0 +1,132 @@
+/// <reference types="node" />
+/// <reference lib="es2016" />
+/// <reference lib="es2017.sharedmemory" />
+/// <reference lib="esnext.asynciterable" />
+/// <reference lib="dom" />
+declare type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array;
+declare type Primitive = null | undefined | string | number | boolean | Symbol;
+export interface ArrayLike {
+    length: number;
+}
+export interface Class<T = unknown> {
+    new (...args: any[]): T;
+}
+declare type DomElement = object & {
+    nodeType: 1;
+    nodeName: string;
+};
+declare type NodeStream = object & {
+    pipe: Function;
+};
+export declare const enum TypeName {
+    null = "null",
+    boolean = "boolean",
+    undefined = "undefined",
+    string = "string",
+    number = "number",
+    symbol = "symbol",
+    Function = "Function",
+    GeneratorFunction = "GeneratorFunction",
+    AsyncFunction = "AsyncFunction",
+    Observable = "Observable",
+    Array = "Array",
+    Buffer = "Buffer",
+    Object = "Object",
+    RegExp = "RegExp",
+    Date = "Date",
+    Error = "Error",
+    Map = "Map",
+    Set = "Set",
+    WeakMap = "WeakMap",
+    WeakSet = "WeakSet",
+    Int8Array = "Int8Array",
+    Uint8Array = "Uint8Array",
+    Uint8ClampedArray = "Uint8ClampedArray",
+    Int16Array = "Int16Array",
+    Uint16Array = "Uint16Array",
+    Int32Array = "Int32Array",
+    Uint32Array = "Uint32Array",
+    Float32Array = "Float32Array",
+    Float64Array = "Float64Array",
+    ArrayBuffer = "ArrayBuffer",
+    SharedArrayBuffer = "SharedArrayBuffer",
+    DataView = "DataView",
+    Promise = "Promise",
+    URL = "URL"
+}
+declare function is(value: unknown): TypeName;
+declare namespace is {
+    const undefined: (value: unknown) => value is undefined;
+    const string: (value: unknown) => value is string;
+    const number: (value: unknown) => value is number;
+    const function_: (value: unknown) => value is Function;
+    const null_: (value: unknown) => value is null;
+    const class_: (value: unknown) => value is Class<unknown>;
+    const boolean: (value: unknown) => value is boolean;
+    const symbol: (value: unknown) => value is Symbol;
+    const numericString: (value: unknown) => boolean;
+    const array: (arg: any) => arg is any[];
+    const buffer: (input: unknown) => input is Buffer;
+    const nullOrUndefined: (value: unknown) => value is null | undefined;
+    const object: (value: unknown) => value is object;
+    const iterable: (value: unknown) => value is IterableIterator<unknown>;
+    const asyncIterable: (value: unknown) => value is AsyncIterableIterator<unknown>;
+    const generator: (value: unknown) => value is Generator;
+    const nativePromise: (value: unknown) => value is Promise<unknown>;
+    const promise: (value: unknown) => value is Promise<unknown>;
+    const generatorFunction: (value: unknown) => value is GeneratorFunction;
+    const asyncFunction: (value: unknown) => value is Function;
+    const boundFunction: (value: unknown) => value is Function;
+    const regExp: (value: unknown) => value is RegExp;
+    const date: (value: unknown) => value is Date;
+    const error: (value: unknown) => value is Error;
+    const map: (value: unknown) => value is Map<unknown, unknown>;
+    const set: (value: unknown) => value is Set<unknown>;
+    const weakMap: (value: unknown) => value is WeakMap<object, unknown>;
+    const weakSet: (value: unknown) => value is WeakSet<object>;
+    const int8Array: (value: unknown) => value is Int8Array;
+    const uint8Array: (value: unknown) => value is Uint8Array;
+    const uint8ClampedArray: (value: unknown) => value is Uint8ClampedArray;
+    const int16Array: (value: unknown) => value is Int16Array;
+    const uint16Array: (value: unknown) => value is Uint16Array;
+    const int32Array: (value: unknown) => value is Int32Array;
+    const uint32Array: (value: unknown) => value is Uint32Array;
+    const float32Array: (value: unknown) => value is Float32Array;
+    const float64Array: (value: unknown) => value is Float64Array;
+    const arrayBuffer: (value: unknown) => value is ArrayBuffer;
+    const sharedArrayBuffer: (value: unknown) => value is SharedArrayBuffer;
+    const dataView: (value: unknown) => value is DataView;
+    const directInstanceOf: <T>(instance: unknown, klass: Class<T>) => instance is T;
+    const urlInstance: (value: unknown) => value is URL;
+    const urlString: (value: unknown) => boolean;
+    const truthy: (value: unknown) => boolean;
+    const falsy: (value: unknown) => boolean;
+    const nan: (value: unknown) => boolean;
+    const primitive: (value: unknown) => value is Primitive;
+    const integer: (value: unknown) => value is number;
+    const safeInteger: (value: unknown) => value is number;
+    const plainObject: (value: unknown) => boolean;
+    const typedArray: (value: unknown) => value is TypedArray;
+    const arrayLike: (value: unknown) => value is ArrayLike;
+    const inRange: (value: number, range: number | number[]) => boolean;
+    const domElement: (value: unknown) => value is DomElement;
+    const observable: (value: unknown) => boolean;
+    const nodeStream: (value: unknown) => value is NodeStream;
+    const infinite: (value: unknown) => boolean;
+    const even: (value: number) => boolean;
+    const odd: (value: number) => boolean;
+    const emptyArray: (value: unknown) => boolean;
+    const nonEmptyArray: (value: unknown) => boolean;
+    const emptyString: (value: unknown) => boolean;
+    const nonEmptyString: (value: unknown) => boolean;
+    const emptyStringOrWhitespace: (value: unknown) => boolean;
+    const emptyObject: (value: unknown) => boolean;
+    const nonEmptyObject: (value: unknown) => boolean;
+    const emptySet: (value: unknown) => boolean;
+    const nonEmptySet: (value: unknown) => boolean;
+    const emptyMap: (value: unknown) => boolean;
+    const nonEmptyMap: (value: unknown) => boolean;
+    const any: (predicate: unknown, ...values: unknown[]) => boolean;
+    const all: (predicate: unknown, ...values: unknown[]) => boolean;
+}
+export default is;

+ 245 - 0
chat-server/node_modules/@sindresorhus/is/dist/index.js

@@ -0,0 +1,245 @@
+"use strict";
+/// <reference lib="es2016"/>
+/// <reference lib="es2017.sharedmemory"/>
+/// <reference lib="esnext.asynciterable"/>
+/// <reference lib="dom"/>
+Object.defineProperty(exports, "__esModule", { value: true });
+// TODO: Use the `URL` global when targeting Node.js 10
+// tslint:disable-next-line
+const URLGlobal = typeof URL === 'undefined' ? require('url').URL : URL;
+const toString = Object.prototype.toString;
+const isOfType = (type) => (value) => typeof value === type;
+const isBuffer = (input) => !is.nullOrUndefined(input) && !is.nullOrUndefined(input.constructor) && is.function_(input.constructor.isBuffer) && input.constructor.isBuffer(input);
+const getObjectType = (value) => {
+    const objectName = toString.call(value).slice(8, -1);
+    if (objectName) {
+        return objectName;
+    }
+    return null;
+};
+const isObjectOfType = (type) => (value) => getObjectType(value) === type;
+function is(value) {
+    switch (value) {
+        case null:
+            return "null" /* null */;
+        case true:
+        case false:
+            return "boolean" /* boolean */;
+        default:
+    }
+    switch (typeof value) {
+        case 'undefined':
+            return "undefined" /* undefined */;
+        case 'string':
+            return "string" /* string */;
+        case 'number':
+            return "number" /* number */;
+        case 'symbol':
+            return "symbol" /* symbol */;
+        default:
+    }
+    if (is.function_(value)) {
+        return "Function" /* Function */;
+    }
+    if (is.observable(value)) {
+        return "Observable" /* Observable */;
+    }
+    if (Array.isArray(value)) {
+        return "Array" /* Array */;
+    }
+    if (isBuffer(value)) {
+        return "Buffer" /* Buffer */;
+    }
+    const tagType = getObjectType(value);
+    if (tagType) {
+        return tagType;
+    }
+    if (value instanceof String || value instanceof Boolean || value instanceof Number) {
+        throw new TypeError('Please don\'t use object wrappers for primitive types');
+    }
+    return "Object" /* Object */;
+}
+(function (is) {
+    // tslint:disable-next-line:strict-type-predicates
+    const isObject = (value) => typeof value === 'object';
+    // tslint:disable:variable-name
+    is.undefined = isOfType('undefined');
+    is.string = isOfType('string');
+    is.number = isOfType('number');
+    is.function_ = isOfType('function');
+    // tslint:disable-next-line:strict-type-predicates
+    is.null_ = (value) => value === null;
+    is.class_ = (value) => is.function_(value) && value.toString().startsWith('class ');
+    is.boolean = (value) => value === true || value === false;
+    is.symbol = isOfType('symbol');
+    // tslint:enable:variable-name
+    is.numericString = (value) => is.string(value) && value.length > 0 && !Number.isNaN(Number(value));
+    is.array = Array.isArray;
+    is.buffer = isBuffer;
+    is.nullOrUndefined = (value) => is.null_(value) || is.undefined(value);
+    is.object = (value) => !is.nullOrUndefined(value) && (is.function_(value) || isObject(value));
+    is.iterable = (value) => !is.nullOrUndefined(value) && is.function_(value[Symbol.iterator]);
+    is.asyncIterable = (value) => !is.nullOrUndefined(value) && is.function_(value[Symbol.asyncIterator]);
+    is.generator = (value) => is.iterable(value) && is.function_(value.next) && is.function_(value.throw);
+    is.nativePromise = (value) => isObjectOfType("Promise" /* Promise */)(value);
+    const hasPromiseAPI = (value) => !is.null_(value) &&
+        isObject(value) &&
+        is.function_(value.then) &&
+        is.function_(value.catch);
+    is.promise = (value) => is.nativePromise(value) || hasPromiseAPI(value);
+    is.generatorFunction = isObjectOfType("GeneratorFunction" /* GeneratorFunction */);
+    is.asyncFunction = isObjectOfType("AsyncFunction" /* AsyncFunction */);
+    is.boundFunction = (value) => is.function_(value) && !value.hasOwnProperty('prototype');
+    is.regExp = isObjectOfType("RegExp" /* RegExp */);
+    is.date = isObjectOfType("Date" /* Date */);
+    is.error = isObjectOfType("Error" /* Error */);
+    is.map = (value) => isObjectOfType("Map" /* Map */)(value);
+    is.set = (value) => isObjectOfType("Set" /* Set */)(value);
+    is.weakMap = (value) => isObjectOfType("WeakMap" /* WeakMap */)(value);
+    is.weakSet = (value) => isObjectOfType("WeakSet" /* WeakSet */)(value);
+    is.int8Array = isObjectOfType("Int8Array" /* Int8Array */);
+    is.uint8Array = isObjectOfType("Uint8Array" /* Uint8Array */);
+    is.uint8ClampedArray = isObjectOfType("Uint8ClampedArray" /* Uint8ClampedArray */);
+    is.int16Array = isObjectOfType("Int16Array" /* Int16Array */);
+    is.uint16Array = isObjectOfType("Uint16Array" /* Uint16Array */);
+    is.int32Array = isObjectOfType("Int32Array" /* Int32Array */);
+    is.uint32Array = isObjectOfType("Uint32Array" /* Uint32Array */);
+    is.float32Array = isObjectOfType("Float32Array" /* Float32Array */);
+    is.float64Array = isObjectOfType("Float64Array" /* Float64Array */);
+    is.arrayBuffer = isObjectOfType("ArrayBuffer" /* ArrayBuffer */);
+    is.sharedArrayBuffer = isObjectOfType("SharedArrayBuffer" /* SharedArrayBuffer */);
+    is.dataView = isObjectOfType("DataView" /* DataView */);
+    is.directInstanceOf = (instance, klass) => Object.getPrototypeOf(instance) === klass.prototype;
+    is.urlInstance = (value) => isObjectOfType("URL" /* URL */)(value);
+    is.urlString = (value) => {
+        if (!is.string(value)) {
+            return false;
+        }
+        try {
+            new URLGlobal(value); // tslint:disable-line no-unused-expression
+            return true;
+        }
+        catch (_a) {
+            return false;
+        }
+    };
+    is.truthy = (value) => Boolean(value);
+    is.falsy = (value) => !value;
+    is.nan = (value) => Number.isNaN(value);
+    const primitiveTypes = new Set([
+        'undefined',
+        'string',
+        'number',
+        'boolean',
+        'symbol'
+    ]);
+    is.primitive = (value) => is.null_(value) || primitiveTypes.has(typeof value);
+    is.integer = (value) => Number.isInteger(value);
+    is.safeInteger = (value) => Number.isSafeInteger(value);
+    is.plainObject = (value) => {
+        // From: https://github.com/sindresorhus/is-plain-obj/blob/master/index.js
+        let prototype;
+        return getObjectType(value) === "Object" /* Object */ &&
+            (prototype = Object.getPrototypeOf(value), prototype === null || // tslint:disable-line:ban-comma-operator
+                prototype === Object.getPrototypeOf({}));
+    };
+    const typedArrayTypes = new Set([
+        "Int8Array" /* Int8Array */,
+        "Uint8Array" /* Uint8Array */,
+        "Uint8ClampedArray" /* Uint8ClampedArray */,
+        "Int16Array" /* Int16Array */,
+        "Uint16Array" /* Uint16Array */,
+        "Int32Array" /* Int32Array */,
+        "Uint32Array" /* Uint32Array */,
+        "Float32Array" /* Float32Array */,
+        "Float64Array" /* Float64Array */
+    ]);
+    is.typedArray = (value) => {
+        const objectType = getObjectType(value);
+        if (objectType === null) {
+            return false;
+        }
+        return typedArrayTypes.has(objectType);
+    };
+    const isValidLength = (value) => is.safeInteger(value) && value > -1;
+    is.arrayLike = (value) => !is.nullOrUndefined(value) && !is.function_(value) && isValidLength(value.length);
+    is.inRange = (value, range) => {
+        if (is.number(range)) {
+            return value >= Math.min(0, range) && value <= Math.max(range, 0);
+        }
+        if (is.array(range) && range.length === 2) {
+            return value >= Math.min(...range) && value <= Math.max(...range);
+        }
+        throw new TypeError(`Invalid range: ${JSON.stringify(range)}`);
+    };
+    const NODE_TYPE_ELEMENT = 1;
+    const DOM_PROPERTIES_TO_CHECK = [
+        'innerHTML',
+        'ownerDocument',
+        'style',
+        'attributes',
+        'nodeValue'
+    ];
+    is.domElement = (value) => is.object(value) && value.nodeType === NODE_TYPE_ELEMENT && is.string(value.nodeName) &&
+        !is.plainObject(value) && DOM_PROPERTIES_TO_CHECK.every(property => property in value);
+    is.observable = (value) => {
+        if (!value) {
+            return false;
+        }
+        if (value[Symbol.observable] && value === value[Symbol.observable]()) {
+            return true;
+        }
+        if (value['@@observable'] && value === value['@@observable']()) {
+            return true;
+        }
+        return false;
+    };
+    is.nodeStream = (value) => !is.nullOrUndefined(value) && isObject(value) && is.function_(value.pipe) && !is.observable(value);
+    is.infinite = (value) => value === Infinity || value === -Infinity;
+    const isAbsoluteMod2 = (rem) => (value) => is.integer(value) && Math.abs(value % 2) === rem;
+    is.even = isAbsoluteMod2(0);
+    is.odd = isAbsoluteMod2(1);
+    const isWhiteSpaceString = (value) => is.string(value) && /\S/.test(value) === false;
+    is.emptyArray = (value) => is.array(value) && value.length === 0;
+    is.nonEmptyArray = (value) => is.array(value) && value.length > 0;
+    is.emptyString = (value) => is.string(value) && value.length === 0;
+    is.nonEmptyString = (value) => is.string(value) && value.length > 0;
+    is.emptyStringOrWhitespace = (value) => is.emptyString(value) || isWhiteSpaceString(value);
+    is.emptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length === 0;
+    is.nonEmptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length > 0;
+    is.emptySet = (value) => is.set(value) && value.size === 0;
+    is.nonEmptySet = (value) => is.set(value) && value.size > 0;
+    is.emptyMap = (value) => is.map(value) && value.size === 0;
+    is.nonEmptyMap = (value) => is.map(value) && value.size > 0;
+    const predicateOnArray = (method, predicate, values) => {
+        if (is.function_(predicate) === false) {
+            throw new TypeError(`Invalid predicate: ${JSON.stringify(predicate)}`);
+        }
+        if (values.length === 0) {
+            throw new TypeError('Invalid number of values');
+        }
+        return method.call(values, predicate);
+    };
+    // tslint:disable variable-name
+    is.any = (predicate, ...values) => predicateOnArray(Array.prototype.some, predicate, values);
+    is.all = (predicate, ...values) => predicateOnArray(Array.prototype.every, predicate, values);
+    // tslint:enable variable-name
+})(is || (is = {}));
+// Some few keywords are reserved, but we'll populate them for Node.js users
+// See https://github.com/Microsoft/TypeScript/issues/2536
+Object.defineProperties(is, {
+    class: {
+        value: is.class_
+    },
+    function: {
+        value: is.function_
+    },
+    null: {
+        value: is.null_
+    }
+});
+exports.default = is;
+// For CommonJS default export support
+module.exports = is;
+module.exports.default = is;
+//# sourceMappingURL=index.js.map

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 0
chat-server/node_modules/@sindresorhus/is/dist/index.js.map


+ 9 - 0
chat-server/node_modules/@sindresorhus/is/license

@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 96 - 0
chat-server/node_modules/@sindresorhus/is/package.json

@@ -0,0 +1,96 @@
+{
+  "_from": "@sindresorhus/is@^0.14.0",
+  "_id": "@sindresorhus/is@0.14.0",
+  "_inBundle": false,
+  "_integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==",
+  "_location": "/@sindresorhus/is",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "@sindresorhus/is@^0.14.0",
+    "name": "@sindresorhus/is",
+    "escapedName": "@sindresorhus%2fis",
+    "scope": "@sindresorhus",
+    "rawSpec": "^0.14.0",
+    "saveSpec": null,
+    "fetchSpec": "^0.14.0"
+  },
+  "_requiredBy": [
+    "/got"
+  ],
+  "_resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz",
+  "_shasum": "9fb3a3cf3132328151f353de4632e01e52102bea",
+  "_spec": "@sindresorhus/is@^0.14.0",
+  "_where": "D:\\a-level\\javascript\\homework\\chat-server\\node_modules\\got",
+  "author": {
+    "name": "Sindre Sorhus",
+    "email": "sindresorhus@gmail.com",
+    "url": "sindresorhus.com"
+  },
+  "bugs": {
+    "url": "https://github.com/sindresorhus/is/issues"
+  },
+  "bundleDependencies": false,
+  "deprecated": false,
+  "description": "Type check values: `is.string('🦄') //=> true`",
+  "devDependencies": {
+    "@sindresorhus/tsconfig": "^0.1.0",
+    "@types/jsdom": "^11.12.0",
+    "@types/node": "^10.12.10",
+    "@types/tempy": "^0.2.0",
+    "@types/zen-observable": "^0.8.0",
+    "ava": "^0.25.0",
+    "del-cli": "^1.1.0",
+    "jsdom": "^11.6.2",
+    "rxjs": "^6.3.3",
+    "tempy": "^0.2.1",
+    "tslint": "^5.9.1",
+    "tslint-xo": "^0.10.0",
+    "typescript": "^3.2.1",
+    "zen-observable": "^0.8.8"
+  },
+  "engines": {
+    "node": ">=6"
+  },
+  "files": [
+    "dist"
+  ],
+  "homepage": "https://github.com/sindresorhus/is#readme",
+  "keywords": [
+    "type",
+    "types",
+    "is",
+    "check",
+    "checking",
+    "validate",
+    "validation",
+    "utility",
+    "util",
+    "typeof",
+    "instanceof",
+    "object",
+    "assert",
+    "assertion",
+    "test",
+    "kind",
+    "primitive",
+    "verify",
+    "compare"
+  ],
+  "license": "MIT",
+  "main": "dist/index.js",
+  "name": "@sindresorhus/is",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/sindresorhus/is.git"
+  },
+  "scripts": {
+    "build": "del dist && tsc",
+    "lint": "tslint --format stylish --project .",
+    "prepublish": "npm run build && del dist/tests",
+    "test": "npm run lint && npm run build && ava dist/tests"
+  },
+  "types": "dist/index.d.ts",
+  "version": "0.14.0"
+}

+ 451 - 0
chat-server/node_modules/@sindresorhus/is/readme.md

@@ -0,0 +1,451 @@
+# is [![Build Status](https://travis-ci.org/sindresorhus/is.svg?branch=master)](https://travis-ci.org/sindresorhus/is)
+
+> Type check values: `is.string('🦄') //=> true`
+
+<img src="header.gif" width="182" align="right">
+
+
+## Install
+
+```
+$ npm install @sindresorhus/is
+```
+
+
+## Usage
+
+```js
+const is = require('@sindresorhus/is');
+
+is('🦄');
+//=> 'string'
+
+is(new Map());
+//=> 'Map'
+
+is.number(6);
+//=> true
+```
+
+When using `is` together with TypeScript, [type guards](http://www.typescriptlang.org/docs/handbook/advanced-types.html#type-guards-and-differentiating-types) are being used to infer the correct type inside if-else statements.
+
+```ts
+import is from '@sindresorhus/is';
+
+const padLeft = (value: string, padding: string | number) => {
+	if (is.number(padding)) {
+		// `padding` is typed as `number`
+		return Array(padding + 1).join(' ') + value;
+	}
+
+	if (is.string(padding)) {
+		// `padding` is typed as `string`
+		return padding + value;
+	}
+
+	throw new TypeError(`Expected 'padding' to be of type 'string' or 'number', got '${is(padding)}'.`);
+}
+
+padLeft('🦄', 3);
+//=> '   🦄'
+
+padLeft('🦄', '🌈');
+//=> '🌈🦄'
+```
+
+
+## API
+
+### is(value)
+
+Returns the type of `value`.
+
+Primitives are lowercase and object types are camelcase.
+
+Example:
+
+- `'undefined'`
+- `'null'`
+- `'string'`
+- `'symbol'`
+- `'Array'`
+- `'Function'`
+- `'Object'`
+
+Note: It will throw an error if you try to feed it object-wrapped primitives, as that's a bad practice. For example `new String('foo')`.
+
+### is.{method}
+
+All the below methods accept a value and returns a boolean for whether the value is of the desired type.
+
+#### Primitives
+
+##### .undefined(value)
+##### .null(value)
+##### .string(value)
+##### .number(value)
+##### .boolean(value)
+##### .symbol(value)
+
+#### Built-in types
+
+##### .array(value)
+##### .function(value)
+##### .buffer(value)
+##### .object(value)
+
+Keep in mind that [functions are objects too](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions).
+
+##### .numericString(value)
+
+Returns `true` for a string that represents a number. For example, `'42'` and `'-8'`.
+
+Note: `'NaN'` returns `false`, but `'Infinity'` and `'-Infinity'` return `true`.
+
+##### .regExp(value)
+##### .date(value)
+##### .error(value)
+##### .nativePromise(value)
+##### .promise(value)
+
+Returns `true` for any object with a `.then()` and `.catch()` method. Prefer this one over `.nativePromise()` as you usually want to allow userland promise implementations too.
+
+##### .generator(value)
+
+Returns `true` for any object that implements its own `.next()` and `.throw()` methods and has a function definition for `Symbol.iterator`.
+
+##### .generatorFunction(value)
+
+##### .asyncFunction(value)
+
+Returns `true` for any `async` function that can be called with the `await` operator.
+
+```js
+is.asyncFunction(async () => {});
+// => true
+
+is.asyncFunction(() => {});
+// => false
+```
+
+##### .boundFunction(value)
+
+Returns `true` for any `bound` function.
+
+```js
+is.boundFunction(() => {});
+// => true
+
+is.boundFunction(function () {}.bind(null));
+// => true
+
+is.boundFunction(function () {});
+// => false
+```
+
+##### .map(value)
+##### .set(value)
+##### .weakMap(value)
+##### .weakSet(value)
+
+#### Typed arrays
+
+##### .int8Array(value)
+##### .uint8Array(value)
+##### .uint8ClampedArray(value)
+##### .int16Array(value)
+##### .uint16Array(value)
+##### .int32Array(value)
+##### .uint32Array(value)
+##### .float32Array(value)
+##### .float64Array(value)
+
+#### Structured data
+
+##### .arrayBuffer(value)
+##### .sharedArrayBuffer(value)
+##### .dataView(value)
+
+#### Emptiness
+
+##### .emptyString(value)
+
+Returns `true` if the value is a `string` and the `.length` is 0.
+
+##### .nonEmptyString(value)
+
+Returns `true` if the value is a `string` and the `.length` is more than 0.
+
+##### .emptyStringOrWhitespace(value)
+
+Returns `true` if `is.emptyString(value)` or if it's a `string` that is all whitespace.
+
+##### .emptyArray(value)
+
+Returns `true` if the value is an `Array` and the `.length` is 0.
+
+##### .nonEmptyArray(value)
+
+Returns `true` if the value is an `Array` and the `.length` is more than 0.
+
+##### .emptyObject(value)
+
+Returns `true` if the value is an `Object` and `Object.keys(value).length` is 0.
+
+Please note that `Object.keys` returns only own enumerable properties. Hence something like this can happen:
+
+```js
+const object1 = {};
+
+Object.defineProperty(object1, 'property1', {
+	value: 42,
+	writable: true,
+	enumerable: false,
+	configurable: true
+});
+
+is.emptyObject(object1);
+// => true
+```
+
+##### .nonEmptyObject(value)
+
+Returns `true` if the value is an `Object` and `Object.keys(value).length` is more than 0.
+
+##### .emptySet(value)
+
+Returns `true` if the value is a `Set` and the `.size` is 0.
+
+##### .nonEmptySet(Value)
+
+Returns `true` if the value is a `Set` and the `.size` is more than 0.
+
+##### .emptyMap(value)
+
+Returns `true` if the value is a `Map` and the `.size` is 0.
+
+##### .nonEmptyMap(value)
+
+Returns `true` if the value is a `Map` and the `.size` is more than 0.
+
+#### Miscellaneous
+
+##### .directInstanceOf(value, class)
+
+Returns `true` if `value` is a direct instance of `class`.
+
+```js
+is.directInstanceOf(new Error(), Error);
+//=> true
+
+class UnicornError extends Error {}
+
+is.directInstanceOf(new UnicornError(), Error);
+//=> false
+```
+
+##### .urlInstance(value)
+
+Returns `true` if `value` is an instance of the [`URL` class](https://developer.mozilla.org/en-US/docs/Web/API/URL).
+
+```js
+const url = new URL('https://example.com');
+
+is.urlInstance(url);
+//=> true
+```
+
+### .url(value)
+
+Returns `true` if `value` is a URL string.
+
+Note: this only does basic checking using the [`URL` class](https://developer.mozilla.org/en-US/docs/Web/API/URL) constructor.
+
+```js
+const url = 'https://example.com';
+
+is.url(url);
+//=> true
+
+is.url(new URL(url));
+//=> false
+```
+
+##### .truthy(value)
+
+Returns `true` for all values that evaluate to true in a boolean context:
+
+```js
+is.truthy('🦄');
+//=> true
+
+is.truthy(undefined);
+//=> false
+```
+
+##### .falsy(value)
+
+Returns `true` if `value` is one of: `false`, `0`, `''`, `null`, `undefined`, `NaN`.
+
+##### .nan(value)
+##### .nullOrUndefined(value)
+##### .primitive(value)
+
+JavaScript primitives are as follows: `null`, `undefined`, `string`, `number`, `boolean`, `symbol`.
+
+##### .integer(value)
+
+##### .safeInteger(value)
+
+Returns `true` if `value` is a [safe integer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger).
+
+##### .plainObject(value)
+
+An object is plain if it's created by either `{}`, `new Object()`, or `Object.create(null)`.
+
+##### .iterable(value)
+##### .asyncIterable(value)
+##### .class(value)
+
+Returns `true` for instances created by a class.
+
+##### .typedArray(value)
+
+##### .arrayLike(value)
+
+A `value` is array-like if it is not a function and has a `value.length` that is a safe integer greater than or equal to 0.
+
+```js
+is.arrayLike(document.forms);
+//=> true
+
+function foo() {
+	is.arrayLike(arguments);
+	//=> true
+}
+foo();
+```
+
+##### .inRange(value, range)
+
+Check if `value` (number) is in the given `range`. The range is an array of two values, lower bound and upper bound, in no specific order.
+
+```js
+is.inRange(3, [0, 5]);
+is.inRange(3, [5, 0]);
+is.inRange(0, [-2, 2]);
+```
+
+##### .inRange(value, upperBound)
+
+Check if `value` (number) is in the range of `0` to `upperBound`.
+
+```js
+is.inRange(3, 10);
+```
+
+##### .domElement(value)
+
+Returns `true` if `value` is a DOM Element.
+
+##### .nodeStream(value)
+
+Returns `true` if `value` is a Node.js [stream](https://nodejs.org/api/stream.html).
+
+```js
+const fs = require('fs');
+
+is.nodeStream(fs.createReadStream('unicorn.png'));
+//=> true
+```
+
+##### .observable(value)
+
+Returns `true` if `value` is an `Observable`.
+
+```js
+const {Observable} = require('rxjs');
+
+is.observable(new Observable());
+//=> true
+```
+
+##### .infinite(value)
+
+Check if `value` is `Infinity` or `-Infinity`.
+
+##### .even(value)
+
+Returns `true` if `value` is an even integer.
+
+##### .odd(value)
+
+Returns `true` if `value` is an odd integer.
+
+##### .any(predicate, ...values)
+
+Returns `true` if **any** of the input `values` returns true in the `predicate`:
+
+```js
+is.any(is.string, {}, true, '🦄');
+//=> true
+
+is.any(is.boolean, 'unicorns', [], new Map());
+//=> false
+```
+
+##### .all(predicate, ...values)
+
+Returns `true` if **all** of the input `values` returns true in the `predicate`:
+
+```js
+is.all(is.object, {}, new Map(), new Set());
+//=> true
+
+is.all(is.string, '🦄', [], 'unicorns');
+//=> false
+```
+
+
+## FAQ
+
+### Why yet another type checking module?
+
+There are hundreds of type checking modules on npm, unfortunately, I couldn't find any that fit my needs:
+
+- Includes both type methods and ability to get the type
+- Types of primitives returned as lowercase and object types as camelcase
+- Covers all built-ins
+- Unsurprising behavior
+- Well-maintained
+- Comprehensive test suite
+
+For the ones I found, pick 3 of these.
+
+The most common mistakes I noticed in these modules was using `instanceof` for type checking, forgetting that functions are objects, and omitting `symbol` as a primitive.
+
+
+## Related
+
+- [ow](https://github.com/sindresorhus/ow) - Function argument validation for humans
+- [is-stream](https://github.com/sindresorhus/is-stream) - Check if something is a Node.js stream
+- [is-observable](https://github.com/sindresorhus/is-observable) - Check if a value is an Observable
+- [file-type](https://github.com/sindresorhus/file-type) - Detect the file type of a Buffer/Uint8Array
+- [is-ip](https://github.com/sindresorhus/is-ip) - Check if a string is an IP address
+- [is-array-sorted](https://github.com/sindresorhus/is-array-sorted) - Check if an Array is sorted
+- [is-error-constructor](https://github.com/sindresorhus/is-error-constructor) - Check if a value is an error constructor
+- [is-empty-iterable](https://github.com/sindresorhus/is-empty-iterable) - Check if an Iterable is empty
+- [is-blob](https://github.com/sindresorhus/is-blob) - Check if a value is a Blob - File-like object of immutable, raw data
+- [has-emoji](https://github.com/sindresorhus/has-emoji) - Check whether a string has any emoji
+
+
+## Created by
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Giora Guttsait](https://github.com/gioragutt)
+- [Brandon Smith](https://github.com/brandon93s)
+
+
+## License
+
+MIT

+ 21 - 0
chat-server/node_modules/@szmarczak/http-timer/LICENSE

@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018 Szymon Marczak
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 70 - 0
chat-server/node_modules/@szmarczak/http-timer/README.md

@@ -0,0 +1,70 @@
+# http-timer
+> Timings for HTTP requests
+
+[![Build Status](https://travis-ci.org/szmarczak/http-timer.svg?branch=master)](https://travis-ci.org/szmarczak/http-timer)
+[![Coverage Status](https://coveralls.io/repos/github/szmarczak/http-timer/badge.svg?branch=master)](https://coveralls.io/github/szmarczak/http-timer?branch=master)
+[![install size](https://packagephobia.now.sh/badge?p=@szmarczak/http-timer)](https://packagephobia.now.sh/result?p=@szmarczak/http-timer)
+
+Inspired by the [`request` package](https://github.com/request/request).
+
+## Usage
+```js
+'use strict';
+const https = require('https');
+const timer = require('@szmarczak/http-timer');
+
+const request = https.get('https://httpbin.org/anything');
+const timings = timer(request);
+
+request.on('response', response => {
+	response.on('data', () => {}); // Consume the data somehow
+	response.on('end', () => {
+		console.log(timings);
+	});
+});
+
+// { start: 1535708511443,
+//   socket: 1535708511444,
+//   lookup: 1535708511444,
+//   connect: 1535708511582,
+//   upload: 1535708511887,
+//   response: 1535708512037,
+//   end: 1535708512040,
+//   phases:
+//    { wait: 1,
+//      dns: 0,
+//      tcp: 138,
+//      request: 305,
+//      firstByte: 150,
+//      download: 3,
+//      total: 597 } }
+```
+
+## API
+
+### timer(request)
+
+Returns: `Object`
+
+- `start` - Time when the request started.
+- `socket` - Time when a socket was assigned to the request.
+- `lookup` - Time when the DNS lookup finished.
+- `connect` - Time when the socket successfully connected.
+- `upload` - Time when the request finished uploading.
+- `response` - Time when the request fired the `response` event.
+- `end` - Time when the response fired the `end` event.
+- `error` - Time when the request fired the `error` event.
+- `phases`
+	- `wait` - `timings.socket - timings.start`
+	- `dns` - `timings.lookup - timings.socket`
+	- `tcp` - `timings.connect - timings.lookup`
+	- `request` - `timings.upload - timings.connect`
+	- `firstByte` - `timings.response - timings.upload`
+	- `download` - `timings.end - timings.response`
+	- `total` - `timings.end - timings.start` or `timings.error - timings.start`
+
+**Note**: The time is a `number` representing the milliseconds elapsed since the UNIX epoch.
+
+## License
+
+MIT

+ 75 - 0
chat-server/node_modules/@szmarczak/http-timer/package.json

@@ -0,0 +1,75 @@
+{
+  "_from": "@szmarczak/http-timer@^1.1.2",
+  "_id": "@szmarczak/http-timer@1.1.2",
+  "_inBundle": false,
+  "_integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==",
+  "_location": "/@szmarczak/http-timer",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "@szmarczak/http-timer@^1.1.2",
+    "name": "@szmarczak/http-timer",
+    "escapedName": "@szmarczak%2fhttp-timer",
+    "scope": "@szmarczak",
+    "rawSpec": "^1.1.2",
+    "saveSpec": null,
+    "fetchSpec": "^1.1.2"
+  },
+  "_requiredBy": [
+    "/got"
+  ],
+  "_resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz",
+  "_shasum": "b1665e2c461a2cd92f4c1bbf50d5454de0d4b421",
+  "_spec": "@szmarczak/http-timer@^1.1.2",
+  "_where": "D:\\a-level\\javascript\\homework\\chat-server\\node_modules\\got",
+  "author": {
+    "name": "Szymon Marczak"
+  },
+  "bugs": {
+    "url": "https://github.com/szmarczak/http-timer/issues"
+  },
+  "bundleDependencies": false,
+  "dependencies": {
+    "defer-to-connect": "^1.0.1"
+  },
+  "deprecated": false,
+  "description": "Timings for HTTP requests",
+  "devDependencies": {
+    "ava": "^0.25.0",
+    "coveralls": "^3.0.2",
+    "nyc": "^12.0.2",
+    "p-event": "^2.1.0",
+    "xo": "^0.22.0"
+  },
+  "engines": {
+    "node": ">=6"
+  },
+  "files": [
+    "source"
+  ],
+  "homepage": "https://github.com/szmarczak/http-timer#readme",
+  "keywords": [
+    "http",
+    "https",
+    "timer",
+    "timings"
+  ],
+  "license": "MIT",
+  "main": "source",
+  "name": "@szmarczak/http-timer",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/szmarczak/http-timer.git"
+  },
+  "scripts": {
+    "coveralls": "nyc report --reporter=text-lcov | coveralls",
+    "test": "xo && nyc ava"
+  },
+  "version": "1.1.2",
+  "xo": {
+    "rules": {
+      "unicorn/filename-case": "camelCase"
+    }
+  }
+}

+ 99 - 0
chat-server/node_modules/@szmarczak/http-timer/source/index.js

@@ -0,0 +1,99 @@
+'use strict';
+const deferToConnect = require('defer-to-connect');
+
+module.exports = request => {
+	const timings = {
+		start: Date.now(),
+		socket: null,
+		lookup: null,
+		connect: null,
+		upload: null,
+		response: null,
+		end: null,
+		error: null,
+		phases: {
+			wait: null,
+			dns: null,
+			tcp: null,
+			request: null,
+			firstByte: null,
+			download: null,
+			total: null
+		}
+	};
+
+	const handleError = origin => {
+		const emit = origin.emit.bind(origin);
+		origin.emit = (event, ...args) => {
+			// Catches the `error` event
+			if (event === 'error') {
+				timings.error = Date.now();
+				timings.phases.total = timings.error - timings.start;
+
+				origin.emit = emit;
+			}
+
+			// Saves the original behavior
+			return emit(event, ...args);
+		};
+	};
+
+	let uploadFinished = false;
+	const onUpload = () => {
+		timings.upload = Date.now();
+		timings.phases.request = timings.upload - timings.connect;
+	};
+
+	handleError(request);
+
+	request.once('socket', socket => {
+		timings.socket = Date.now();
+		timings.phases.wait = timings.socket - timings.start;
+
+		const lookupListener = () => {
+			timings.lookup = Date.now();
+			timings.phases.dns = timings.lookup - timings.socket;
+		};
+
+		socket.once('lookup', lookupListener);
+
+		deferToConnect(socket, () => {
+			timings.connect = Date.now();
+
+			if (timings.lookup === null) {
+				socket.removeListener('lookup', lookupListener);
+				timings.lookup = timings.connect;
+				timings.phases.dns = timings.lookup - timings.socket;
+			}
+
+			timings.phases.tcp = timings.connect - timings.lookup;
+
+			if (uploadFinished && !timings.upload) {
+				onUpload();
+			}
+		});
+	});
+
+	request.once('finish', () => {
+		uploadFinished = true;
+
+		if (timings.connect) {
+			onUpload();
+		}
+	});
+
+	request.once('response', response => {
+		timings.response = Date.now();
+		timings.phases.firstByte = timings.response - timings.upload;
+
+		handleError(response);
+
+		response.once('end', () => {
+			timings.end = Date.now();
+			timings.phases.download = timings.end - timings.response;
+			timings.phases.total = timings.end - timings.start;
+		});
+	});
+
+	return timings;
+};

+ 21 - 0
chat-server/node_modules/@types/color-name/LICENSE

@@ -0,0 +1,21 @@
+    MIT License
+
+    Copyright (c) Microsoft Corporation. All rights reserved.
+
+    Permission is hereby granted, free of charge, to any person obtaining a copy
+    of this software and associated documentation files (the "Software"), to deal
+    in the Software without restriction, including without limitation the rights
+    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+    copies of the Software, and to permit persons to whom the Software is
+    furnished to do so, subject to the following conditions:
+
+    The above copyright notice and this permission notice shall be included in all
+    copies or substantial portions of the Software.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+    SOFTWARE

+ 16 - 0
chat-server/node_modules/@types/color-name/README.md

@@ -0,0 +1,16 @@
+# Installation
+> `npm install --save @types/color-name`
+
+# Summary
+This package contains type definitions for color-name ( https://github.com/colorjs/color-name ).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/color-name
+
+Additional Details
+ * Last updated: Wed, 13 Feb 2019 16:16:48 GMT
+ * Dependencies: none
+ * Global values: none
+
+# Credits
+These definitions were written by Junyoung Clare Jang <https://github.com/Ailrun>.

+ 161 - 0
chat-server/node_modules/@types/color-name/index.d.ts

@@ -0,0 +1,161 @@
+// Type definitions for color-name 1.1
+// Project: https://github.com/colorjs/color-name
+// Definitions by: Junyoung Clare Jang <https://github.com/Ailrun>
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+/**
+ * Tuple of Red, Green, and Blue
+ * @example
+ * // Red = 55, Green = 70, Blue = 0
+ * const rgb: RGB = [55, 70, 0];
+ */
+export type RGB = [number, number, number];
+
+export const aliceblue: RGB;
+export const antiquewhite: RGB;
+export const aqua: RGB;
+export const aquamarine: RGB;
+export const azure: RGB;
+export const beige: RGB;
+export const bisque: RGB;
+export const black: RGB;
+export const blanchedalmond: RGB;
+export const blue: RGB;
+export const blueviolet: RGB;
+export const brown: RGB;
+export const burlywood: RGB;
+export const cadetblue: RGB;
+export const chartreuse: RGB;
+export const chocolate: RGB;
+export const coral: RGB;
+export const cornflowerblue: RGB;
+export const cornsilk: RGB;
+export const crimson: RGB;
+export const cyan: RGB;
+export const darkblue: RGB;
+export const darkcyan: RGB;
+export const darkgoldenrod: RGB;
+export const darkgray: RGB;
+export const darkgreen: RGB;
+export const darkgrey: RGB;
+export const darkkhaki: RGB;
+export const darkmagenta: RGB;
+export const darkolivegreen: RGB;
+export const darkorange: RGB;
+export const darkorchid: RGB;
+export const darkred: RGB;
+export const darksalmon: RGB;
+export const darkseagreen: RGB;
+export const darkslateblue: RGB;
+export const darkslategray: RGB;
+export const darkslategrey: RGB;
+export const darkturquoise: RGB;
+export const darkviolet: RGB;
+export const deeppink: RGB;
+export const deepskyblue: RGB;
+export const dimgray: RGB;
+export const dimgrey: RGB;
+export const dodgerblue: RGB;
+export const firebrick: RGB;
+export const floralwhite: RGB;
+export const forestgreen: RGB;
+export const fuchsia: RGB;
+export const gainsboro: RGB;
+export const ghostwhite: RGB;
+export const gold: RGB;
+export const goldenrod: RGB;
+export const gray: RGB;
+export const green: RGB;
+export const greenyellow: RGB;
+export const grey: RGB;
+export const honeydew: RGB;
+export const hotpink: RGB;
+export const indianred: RGB;
+export const indigo: RGB;
+export const ivory: RGB;
+export const khaki: RGB;
+export const lavender: RGB;
+export const lavenderblush: RGB;
+export const lawngreen: RGB;
+export const lemonchiffon: RGB;
+export const lightblue: RGB;
+export const lightcoral: RGB;
+export const lightcyan: RGB;
+export const lightgoldenrodyellow: RGB;
+export const lightgray: RGB;
+export const lightgreen: RGB;
+export const lightgrey: RGB;
+export const lightpink: RGB;
+export const lightsalmon: RGB;
+export const lightseagreen: RGB;
+export const lightskyblue: RGB;
+export const lightslategray: RGB;
+export const lightslategrey: RGB;
+export const lightsteelblue: RGB;
+export const lightyellow: RGB;
+export const lime: RGB;
+export const limegreen: RGB;
+export const linen: RGB;
+export const magenta: RGB;
+export const maroon: RGB;
+export const mediumaquamarine: RGB;
+export const mediumblue: RGB;
+export const mediumorchid: RGB;
+export const mediumpurple: RGB;
+export const mediumseagreen: RGB;
+export const mediumslateblue: RGB;
+export const mediumspringgreen: RGB;
+export const mediumturquoise: RGB;
+export const mediumvioletred: RGB;
+export const midnightblue: RGB;
+export const mintcream: RGB;
+export const mistyrose: RGB;
+export const moccasin: RGB;
+export const navajowhite: RGB;
+export const navy: RGB;
+export const oldlace: RGB;
+export const olive: RGB;
+export const olivedrab: RGB;
+export const orange: RGB;
+export const orangered: RGB;
+export const orchid: RGB;
+export const palegoldenrod: RGB;
+export const palegreen: RGB;
+export const paleturquoise: RGB;
+export const palevioletred: RGB;
+export const papayawhip: RGB;
+export const peachpuff: RGB;
+export const peru: RGB;
+export const pink: RGB;
+export const plum: RGB;
+export const powderblue: RGB;
+export const purple: RGB;
+export const rebeccapurple: RGB;
+export const red: RGB;
+export const rosybrown: RGB;
+export const royalblue: RGB;
+export const saddlebrown: RGB;
+export const salmon: RGB;
+export const sandybrown: RGB;
+export const seagreen: RGB;
+export const seashell: RGB;
+export const sienna: RGB;
+export const silver: RGB;
+export const skyblue: RGB;
+export const slateblue: RGB;
+export const slategray: RGB;
+export const slategrey: RGB;
+export const snow: RGB;
+export const springgreen: RGB;
+export const steelblue: RGB;
+export const tan: RGB;
+export const teal: RGB;
+export const thistle: RGB;
+export const tomato: RGB;
+export const turquoise: RGB;
+export const violet: RGB;
+export const wheat: RGB;
+export const white: RGB;
+export const whitesmoke: RGB;
+export const yellow: RGB;
+export const yellowgreen: RGB;

+ 52 - 0
chat-server/node_modules/@types/color-name/package.json

@@ -0,0 +1,52 @@
+{
+  "_from": "@types/color-name@^1.1.1",
+  "_id": "@types/color-name@1.1.1",
+  "_inBundle": false,
+  "_integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==",
+  "_location": "/@types/color-name",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "@types/color-name@^1.1.1",
+    "name": "@types/color-name",
+    "escapedName": "@types%2fcolor-name",
+    "scope": "@types",
+    "rawSpec": "^1.1.1",
+    "saveSpec": null,
+    "fetchSpec": "^1.1.1"
+  },
+  "_requiredBy": [
+    "/ansi-styles"
+  ],
+  "_resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
+  "_shasum": "1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0",
+  "_spec": "@types/color-name@^1.1.1",
+  "_where": "D:\\a-level\\javascript\\homework\\chat-server\\node_modules\\ansi-styles",
+  "bugs": {
+    "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
+  },
+  "bundleDependencies": false,
+  "contributors": [
+    {
+      "name": "Junyoung Clare Jang",
+      "url": "https://github.com/Ailrun"
+    }
+  ],
+  "dependencies": {},
+  "deprecated": false,
+  "description": "TypeScript definitions for color-name",
+  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
+  "license": "MIT",
+  "main": "",
+  "name": "@types/color-name",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git"
+  },
+  "scripts": {},
+  "typeScriptVersion": "2.0",
+  "types": "index",
+  "typesPublisherContentHash": "e22c6881e2dcf766e32142cbb82d9acf9c08258bdf0da8e76c8a448d1be44ac7",
+  "version": "1.1.1"
+}

+ 0 - 0
chat-server/node_modules/abbrev/LICENSE


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio