From 3d1cd02f27518f1a04374c7c8320cd5d82ede6e9 Mon Sep 17 00:00:00 2001
From: Minteck <contact@minteck.org>
Date: Thu, 23 Feb 2023 19:34:56 +0100
Subject: Updated 40 files, added 37 files, deleted 1103 files and renamed 3905
 files (automated)

---
 .../node_modules/uuid/dist/esm-node/stringify.js   | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 includes/external/school/node_modules/uuid/dist/esm-node/stringify.js

(limited to 'includes/external/school/node_modules/uuid/dist/esm-node/stringify.js')

diff --git a/includes/external/school/node_modules/uuid/dist/esm-node/stringify.js b/includes/external/school/node_modules/uuid/dist/esm-node/stringify.js
new file mode 100644
index 0000000..f9bca12
--- /dev/null
+++ b/includes/external/school/node_modules/uuid/dist/esm-node/stringify.js
@@ -0,0 +1,29 @@
+import validate from './validate.js';
+/**
+ * Convert array of 16 byte values to UUID string format of the form:
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
+ */
+
+const byteToHex = [];
+
+for (let i = 0; i < 256; ++i) {
+  byteToHex.push((i + 0x100).toString(16).substr(1));
+}
+
+function stringify(arr, offset = 0) {
+  // Note: Be careful editing this code!  It's been tuned for performance
+  // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
+  const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID.  If this throws, it's likely due to one
+  // of the following:
+  // - One or more input array values don't map to a hex octet (leading to
+  // "undefined" in the uuid)
+  // - Invalid input values for the RFC `version` or `variant` fields
+
+  if (!validate(uuid)) {
+    throw TypeError('Stringified UUID is invalid');
+  }
+
+  return uuid;
+}
+
+export default stringify;
\ No newline at end of file
-- 
cgit