diff --git a/dependencies/prism/script.js b/dependencies/prism/script.js
index a8782fb..0ddc38f 100644
--- a/dependencies/prism/script.js
+++ b/dependencies/prism/script.js
@@ -1,5 +1,6 @@
/* PrismJS 1.17.1
-https://prismjs.com/download.html#themes=prism-okaidia&languages=clike+javascript */
-var _self = "undefined" != typeof window ? window : "undefined" != typeof WorkerGlobalScope && self instanceof WorkerGlobalScope ? self : {}, Prism = function (u) { var c = /\blang(?:uage)?-([\w-]+)\b/i, a = 0; var _ = { manual: u.Prism && u.Prism.manual, disableWorkerMessageHandler: u.Prism && u.Prism.disableWorkerMessageHandler, util: { encode: function (e) { return e instanceof L ? new L(e.type, _.util.encode(e.content), e.alias) : Array.isArray(e) ? e.map(_.util.encode) : e.replace(/&/g, "&").replace(/ e.length) return; if (!(k instanceof L)) { if (h && y != a.length - 1) { if (c.lastIndex = v, !(x = c.exec(e))) break; for (var b = x.index + (f && x[1] ? x[1].length : 0), w = x.index + x[0].length, A = y, P = v, O = a.length; A < O && (P < w || !a[A].type && !a[A - 1].greedy); ++A)(P += a[A].length) <= b && (++y, v = P); if (a[y] instanceof L) continue; j = A - y, k = e.slice(v, P), x.index -= v } else { c.lastIndex = 0; var x = c.exec(k), j = 1 } if (x) { f && (d = x[1] ? x[1].length : 0); w = (b = x.index + d) + (x = x[0].slice(d)).length; var N = k.slice(0, b), S = k.slice(w), C = [y, j]; N && (++y, v += N.length, C.push(N)); var E = new L(l, g ? _.tokenize(x, g) : x, m, x, h); if (C.push(E), S && C.push(S), Array.prototype.splice.apply(a, C), 1 != j && _.matchGrammar(e, a, n, y, v, !0, l + "," + u), i) break } else if (i) break } } } } }, tokenize: function (e, a) { var n = [e], r = a.rest; if (r) { for (var t in r) a[t] = r[t]; delete a.rest } return _.matchGrammar(e, n, a, 0, 0, !1), n }, hooks: { all: {}, add: function (e, a) { var n = _.hooks.all; n[e] = n[e] || [], n[e].push(a) }, run: function (e, a) { var n = _.hooks.all[e]; if (n && n.length) for (var r, t = 0; r = n[t++];)r(a) } }, Token: L }; function L(e, a, n, r, t) { this.type = e, this.content = a, this.alias = n, this.length = 0 | (r || "").length, this.greedy = !!t } if (u.Prism = _, L.stringify = function (e, a) { if ("string" == typeof e) return e; if (Array.isArray(e)) return e.map(function (e) { return L.stringify(e, a) }).join(""); var n = { type: e.type, content: L.stringify(e.content, a), tag: "span", classes: ["token", e.type], attributes: {}, language: a }; if (e.alias) { var r = Array.isArray(e.alias) ? e.alias : [e.alias]; Array.prototype.push.apply(n.classes, r) } _.hooks.run("wrap", n); var t = Object.keys(n.attributes).map(function (e) { return e + '="' + (n.attributes[e] || "").replace(/"/g, """) + '"' }).join(" "); return "<" + n.tag + ' class="' + n.classes.join(" ") + '"' + (t ? " " + t : "") + ">" + n.content + "" + n.tag + ">" }, !u.document) return u.addEventListener && (_.disableWorkerMessageHandler || u.addEventListener("message", function (e) { var a = JSON.parse(e.data), n = a.language, r = a.code, t = a.immediateClose; u.postMessage(_.highlight(r, _.languages[n], n)), t && u.close() }, !1)), _; var e = document.currentScript || [].slice.call(document.getElementsByTagName("script")).pop(); if (e && (_.filename = e.src, e.hasAttribute("data-manual") && (_.manual = !0)), !_.manual) { function n() { _.manual || _.highlightAll() } "loading" !== document.readyState ? window.requestAnimationFrame ? window.requestAnimationFrame(n) : window.setTimeout(n, 16) : document.addEventListener("DOMContentLoaded", n) } return _ }(_self); "undefined" != typeof module && module.exports && (module.exports = Prism), "undefined" != typeof global && (global.Prism = Prism);
-Prism.languages.clike = { comment: [{ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0 }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }], string: { pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, greedy: !0 }, "class-name": { pattern: /((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i, lookbehind: !0, inside: { punctuation: /[.\\]/ } }, keyword: /\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/, boolean: /\b(?:true|false)\b/, function: /\w+(?=\()/, number: /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i, operator: /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/, punctuation: /[{}[\];(),.:]/ };
-Prism.languages.javascript = Prism.languages.extend("clike", { "class-name": [Prism.languages.clike["class-name"], { pattern: /(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/, lookbehind: !0 }], keyword: [{ pattern: /((?:^|})\s*)(?:catch|finally)\b/, lookbehind: !0 }, { pattern: /(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: !0 }], number: /\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/, function: /#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, operator: /--|\+\+|\*\*=?|=>|&&|\|\||[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|[~?:]/ }), Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/, Prism.languages.insertBefore("javascript", "keyword", { regex: { pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/, lookbehind: !0, greedy: !0 }, "function-variable": { pattern: /#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/, alias: "function" }, parameter: [{ pattern: /(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i, inside: Prism.languages.javascript }, { pattern: /(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/, lookbehind: !0, inside: Prism.languages.javascript }], constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/ }), Prism.languages.insertBefore("javascript", "string", { "template-string": { pattern: /`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/, greedy: !0, inside: { "template-punctuation": { pattern: /^`|`$/, alias: "string" }, interpolation: { pattern: /((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/, lookbehind: !0, inside: { "interpolation-punctuation": { pattern: /^\${|}$/, alias: "punctuation" }, rest: Prism.languages.javascript } }, string: /[\s\S]+/ } } }), Prism.languages.markup && Prism.languages.markup.tag.addInlined("script", "javascript"), Prism.languages.js = Prism.languages.javascript;
+https://prismjs.com/download.html#themes=prism-okaidia&languages=clike+javascript&plugins=line-numbers */
+var _self = "undefined" != typeof window ? window : "undefined" != typeof WorkerGlobalScope && self instanceof WorkerGlobalScope ? self : {}, Prism = function (u) { var c = /\blang(?:uage)?-([\w-]+)\b/i, r = 0; var _ = { manual: u.Prism && u.Prism.manual, disableWorkerMessageHandler: u.Prism && u.Prism.disableWorkerMessageHandler, util: { encode: function (e) { return e instanceof L ? new L(e.type, _.util.encode(e.content), e.alias) : Array.isArray(e) ? e.map(_.util.encode) : e.replace(/&/g, "&").replace(/ e.length) return; if (!(k instanceof L)) { if (d && y != r.length - 1) { if (c.lastIndex = v, !(O = c.exec(e))) break; for (var b = O.index + (f && O[1] ? O[1].length : 0), w = O.index + O[0].length, A = y, P = v, x = r.length; A < x && (P < w || !r[A].type && !r[A - 1].greedy); ++A)(P += r[A].length) <= b && (++y, v = P); if (r[y] instanceof L) continue; S = A - y, k = e.slice(v, P), O.index -= v } else { c.lastIndex = 0; var O = c.exec(k), S = 1 } if (O) { f && (h = O[1] ? O[1].length : 0); w = (b = O.index + h) + (O = O[0].slice(h)).length; var j = k.slice(0, b), N = k.slice(w), E = [y, S]; j && (++y, v += j.length, E.push(j)); var C = new L(l, g ? _.tokenize(O, g) : O, m, O, d); if (E.push(C), N && E.push(N), Array.prototype.splice.apply(r, E), 1 != S && _.matchGrammar(e, r, n, y, v, !0, l + "," + u), i) break } else if (i) break } } } } }, tokenize: function (e, r) { var n = [e], t = r.rest; if (t) { for (var a in t) r[a] = t[a]; delete r.rest } return _.matchGrammar(e, n, r, 0, 0, !1), n }, hooks: { all: {}, add: function (e, r) { var n = _.hooks.all; n[e] = n[e] || [], n[e].push(r) }, run: function (e, r) { var n = _.hooks.all[e]; if (n && n.length) for (var t, a = 0; t = n[a++];)t(r) } }, Token: L }; function L(e, r, n, t, a) { this.type = e, this.content = r, this.alias = n, this.length = 0 | (t || "").length, this.greedy = !!a } if (u.Prism = _, L.stringify = function (e, r) { if ("string" == typeof e) return e; if (Array.isArray(e)) return e.map(function (e) { return L.stringify(e, r) }).join(""); var n = { type: e.type, content: L.stringify(e.content, r), tag: "span", classes: ["token", e.type], attributes: {}, language: r }; if (e.alias) { var t = Array.isArray(e.alias) ? e.alias : [e.alias]; Array.prototype.push.apply(n.classes, t) } _.hooks.run("wrap", n); var a = Object.keys(n.attributes).map(function (e) { return e + '="' + (n.attributes[e] || "").replace(/"/g, """) + '"' }).join(" "); return "<" + n.tag + ' class="' + n.classes.join(" ") + '"' + (a ? " " + a : "") + ">" + n.content + "" + n.tag + ">" }, !u.document) return u.addEventListener && (_.disableWorkerMessageHandler || u.addEventListener("message", function (e) { var r = JSON.parse(e.data), n = r.language, t = r.code, a = r.immediateClose; u.postMessage(_.highlight(t, _.languages[n], n)), a && u.close() }, !1)), _; var e = _.util.currentScript(); if (e && (_.filename = e.src, e.hasAttribute("data-manual") && (_.manual = !0)), !_.manual) { function n() { _.manual || _.highlightAll() } var t = document.readyState; "loading" === t || "interactive" === t && e && e.defer ? document.addEventListener("DOMContentLoaded", n) : window.requestAnimationFrame ? window.requestAnimationFrame(n) : window.setTimeout(n, 16) } return _ }(_self); "undefined" != typeof module && module.exports && (module.exports = Prism), "undefined" != typeof global && (global.Prism = Prism);
+Prism.languages.clike = { comment: [{ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0 }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }], string: { pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, greedy: !0 }, "class-name": { pattern: /(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i, lookbehind: !0, inside: { punctuation: /[.\\]/ } }, keyword: /\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/, boolean: /\b(?:true|false)\b/, function: /\w+(?=\()/, number: /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i, operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, punctuation: /[{}[\];(),.:]/ };
+Prism.languages.javascript = Prism.languages.extend("clike", { "class-name": [Prism.languages.clike["class-name"], { pattern: /(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/, lookbehind: !0 }], keyword: [{ pattern: /((?:^|})\s*)(?:catch|finally)\b/, lookbehind: !0 }, { pattern: /(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: !0 }], number: /\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/, function: /#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, operator: /--|\+\+|\*\*=?|=>|&&|\|\||[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?[.?]?|[~:]/ }), Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/, Prism.languages.insertBefore("javascript", "keyword", { regex: { pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*(?:$|[\r\n,.;})\]]))/, lookbehind: !0, greedy: !0 }, "function-variable": { pattern: /#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/, alias: "function" }, parameter: [{ pattern: /(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i, inside: Prism.languages.javascript }, { pattern: /(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/, lookbehind: !0, inside: Prism.languages.javascript }], constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/ }), Prism.languages.insertBefore("javascript", "string", { "template-string": { pattern: /`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/, greedy: !0, inside: { "template-punctuation": { pattern: /^`|`$/, alias: "string" }, interpolation: { pattern: /((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/, lookbehind: !0, inside: { "interpolation-punctuation": { pattern: /^\${|}$/, alias: "punctuation" }, rest: Prism.languages.javascript } }, string: /[\s\S]+/ } } }), Prism.languages.markup && Prism.languages.markup.tag.addInlined("script", "javascript"), Prism.languages.js = Prism.languages.javascript;
+!function () { if ("undefined" != typeof self && self.Prism && self.document) { var l = "line-numbers", c = /\n(?!$)/g, m = function (e) { var t = a(e)["white-space"]; if ("pre-wrap" === t || "pre-line" === t) { var n = e.querySelector("code"), r = e.querySelector(".line-numbers-rows"), s = e.querySelector(".line-numbers-sizer"), i = n.textContent.split(c); s || ((s = document.createElement("span")).className = "line-numbers-sizer", n.appendChild(s)), s.style.display = "block", i.forEach(function (e, t) { s.textContent = e || "\n"; var n = s.getBoundingClientRect().height; r.children[t].style.height = n + "px" }), s.textContent = "", s.style.display = "none" } }, a = function (e) { return e ? window.getComputedStyle ? getComputedStyle(e) : e.currentStyle || null : null }; window.addEventListener("resize", function () { Array.prototype.forEach.call(document.querySelectorAll("pre." + l), m) }), Prism.hooks.add("complete", function (e) { if (e.code) { var t = e.element, n = t.parentNode; if (n && /pre/i.test(n.nodeName) && !t.querySelector(".line-numbers-rows")) { for (var r = !1, s = /(?:^|\s)line-numbers(?:\s|$)/, i = t; i; i = i.parentNode)if (s.test(i.className)) { r = !0; break } if (r) { t.className = t.className.replace(s, " "), s.test(n.className) || (n.className += " line-numbers"); var l, a = e.code.match(c), o = a ? a.length + 1 : 1, u = new Array(o + 1).join(""); (l = document.createElement("span")).setAttribute("aria-hidden", "true"), l.className = "line-numbers-rows", l.innerHTML = u, n.hasAttribute("data-start") && (n.style.counterReset = "linenumber " + (parseInt(n.getAttribute("data-start"), 10) - 1)), e.element.appendChild(l), m(n), Prism.hooks.run("line-numbers", e) } } } }), Prism.hooks.add("line-numbers", function (e) { e.plugins = e.plugins || {}, e.plugins.lineNumbers = !0 }), Prism.plugins.lineNumbers = { getLine: function (e, t) { if ("PRE" === e.tagName && e.classList.contains(l)) { var n = e.querySelector(".line-numbers-rows"), r = parseInt(e.getAttribute("data-start"), 10) || 1, s = r + (n.children.length - 1); t < r && (t = r), s < t && (t = s); var i = t - r; return n.children[i] } } } } }();
diff --git a/dependencies/prism/style.css b/dependencies/prism/style.css
index af3bbad..cedea10 100644
--- a/dependencies/prism/style.css
+++ b/dependencies/prism/style.css
@@ -1,5 +1,5 @@
/* PrismJS 1.17.1
-https://prismjs.com/download.html#themes=prism-okaidia&languages=clike+javascript */
+https://prismjs.com/download.html#themes=prism-okaidia&languages=clike+javascript&plugins=line-numbers */
/**
* okaidia theme for JavaScript, CSS and HTML
* Loosely based on Monokai textmate theme by http://www.monokai.nl/
@@ -124,3 +124,45 @@ pre[class*="language-"] {
cursor: help;
}
+pre[class*="language-"].line-numbers {
+ position: relative;
+ padding-left: 3.8em;
+ counter-reset: linenumber;
+}
+
+pre[class*="language-"].line-numbers > code {
+ position: relative;
+ white-space: inherit;
+}
+
+.line-numbers .line-numbers-rows {
+ position: absolute;
+ pointer-events: none;
+ top: 0;
+ font-size: 100%;
+ left: -3.8em;
+ width: 3em; /* works for line-numbers below 1000 lines */
+ letter-spacing: -1px;
+ border-right: 1px solid #999;
+
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+
+}
+
+ .line-numbers-rows > span {
+ pointer-events: none;
+ display: block;
+ counter-increment: linenumber;
+ }
+
+ .line-numbers-rows > span:before {
+ content: counter(linenumber);
+ color: #999;
+ display: block;
+ padding-right: 0.8em;
+ text-align: right;
+ }
+
diff --git a/dependencies/toString.js b/dependencies/toString.js
index ea80a88..979392c 100644
--- a/dependencies/toString.js
+++ b/dependencies/toString.js
@@ -1,3 +1,5 @@
+// ** doesn't do nicely with lots of comments in a method
+
/* opinionated & lazy formatting
assumes double-spaced indentation
diff --git a/week-1-project/index.html b/week-1-project/index.html
index 3de938b..55a6cd3 100644
--- a/week-1-project/index.html
+++ b/week-1-project/index.html
@@ -46,18 +46,20 @@
diff --git a/week-1-project/practice-problems/arrays.js b/week-1-project/practice-problems/arrays.js
index c5add90..9342ce9 100644
--- a/week-1-project/practice-problems/arrays.js
+++ b/week-1-project/practice-problems/arrays.js
@@ -1,4 +1,4 @@
-// https://www.youtube.com/watch?v=W1NTK09o-vM&list=PLzV58Zm8FuBJFfQN5il3ujx6FDAY8Ds3u&index=4
+// https://www.youtube.com/watch?v=W1NTK09o-vM&list=PLzV58Zm8FuBJFfQN5il3ujx6FDAY8Ds3u&index=4
// https://medium.com/@naveenkarippai/learning-how-references-work-in-javascript-a066a4e15600
{
@@ -35,6 +35,7 @@ try {
// to create a new array in memory, you must write new square brackets
+ // (or call an array method that returns a copy, more on that later)
const array3 = [];
// reassigning object2 will make it point to ...
array2 = array3;
diff --git a/week-2-project/app.js b/week-2-project/app.js
index 1eec39e..90e883b 100644
--- a/week-2-project/app.js
+++ b/week-2-project/app.js
@@ -43,6 +43,8 @@ const object = {
return new ReferenceError(`removeEntry: no property "${key}" in this.entries`);
}
+ delete this.entries[key]
+ return true
// write me!
},
updateEntry: function (key, value) {
diff --git a/week-2-project/index.html b/week-2-project/index.html
index e559c32..f4e68c4 100644
--- a/week-2-project/index.html
+++ b/week-2-project/index.html
@@ -45,18 +45,20 @@
diff --git a/week-2-project/tests/find-by-value.js b/week-2-project/tests/find-by-value.js
index 0ae4f3a..457a7af 100644
--- a/week-2-project/tests/find-by-value.js
+++ b/week-2-project/tests/find-by-value.js
@@ -31,31 +31,31 @@ describe(`findByValue: returns the requested key/value pair, or an informative e
});
});
});
- describe(`otherwise returns an object containing the requested key/value pairs`, () => {
+ describe(`otherwise returns an object containing the requested key/value pair`, () => {
[
['firstValue', { firstKey: 'firstValue' }],
['secondValue', { secondKey: 'secondValue' }],
['thirdValue', { thirdKey: 'thirdValue' }],
].forEach(arg => {
- it(`it finds the correct key for ${arg[0]}`, () => {
+ it(`it returns the correct entry for value : ${arg[0]}`, () => {
const result = object.findByValue(arg[0]);
assert.deepStrictEqual(result, arg[1]);
});
});
- it(`it finds all keys containing "fourthValue"`, () => {
+ it(`it finds all keys containing "fourthValue ... "`, () => {
const result = object.findByValue('fourthValue');
assert.deepStrictEqual(result, {
- fourthKey: 'fourthValue',
- fifthKey: 'fourthValue',
- sixthKey: 'fourthValue'
+ 'fourthKey': 'fourthValue',
+ 'fifthKey': 'fourthValue',
+ 'sixthKey': 'fourthValue'
});
});
- it(`and all keys containing "fifthValue"`, () => {
+ it(`... and all keys containing "fifthValue"`, () => {
const result = object.findByValue('fifthValue');
assert.deepStrictEqual(result, {
- seventhKey: 'fifthValue',
- eighthKey: 'fifthValue',
- ninthKey: 'fifthValue'
+ 'seventhKey': 'fifthValue',
+ 'eighthKey': 'fifthValue',
+ 'ninthKey': 'fifthValue'
});
});
});
diff --git a/week-2-project/tests/has-key.js b/week-2-project/tests/has-key.js
index 7388df3..62184f1 100644
--- a/week-2-project/tests/has-key.js
+++ b/week-2-project/tests/has-key.js
@@ -35,7 +35,18 @@ describe(`hasKey: determines if an object has a given key`, () => {
});
});
describe(`and returns false for non-existant entries.`, () => {
- ['entries', 'hasKey', 'toSource', 'valueOf', 'hasOwnProperty'].forEach(arg => {
+ ['entries', 'hasKey', 'toSource', 'valueOf', 'hasOwnProperty', ''].forEach(arg => {
+ it(arg, () => {
+ const result = object.hasKey(object.entries, arg);
+ assert.strictEqual(result, false);
+ });
+ });
+ });
+ describe(`or when there are no entries!`, () => {
+ before(() => {
+ object.entries = {};
+ });
+ ['entries', 'hasKey', 'toSource', 'valueOf', 'hasOwnProperty', ''].forEach(arg => {
it(arg, () => {
const result = object.hasKey(object.entries, arg);
assert.strictEqual(result, false);
diff --git a/week-2-project/tests/has-value.js b/week-2-project/tests/has-value.js
index 8e9c4fa..beb3f29 100644
--- a/week-2-project/tests/has-value.js
+++ b/week-2-project/tests/has-value.js
@@ -42,4 +42,15 @@ describe(`hasValue: determines if an object has a given value`, () => {
});
});
});
+ describe(`even when there are no entries!`, () => {
+ before(() => {
+ object.entries = {};
+ });
+ ['tomato', null, true, undefined, 4].forEach(arg => {
+ it(arg, () => {
+ const result = object.hasValue(object.entries, arg);
+ assert.strictEqual(result, false);
+ });
+ });
+ });
});
diff --git a/week-2-project/tests/remove-entry.js b/week-2-project/tests/remove-entry.js
index 3b02792..f3b310f 100644
--- a/week-2-project/tests/remove-entry.js
+++ b/week-2-project/tests/remove-entry.js
@@ -38,7 +38,7 @@ describe(`removeEntry: should remove a key/value pair from this.entries`, () =>
describe(`... and actually removes the entries!`, () => {
valuesToRemove.forEach(arg => {
it(`object.hasKey(object.entries, ${arg}) === false`, () => {
- assert.strictEqual(object.hasKey(object.entries, arg), false);
+ assert.strictEqual(this.entries.hasOwnProperty(arg), false);
});
});
});
diff --git a/week-3-project/index.html b/week-3-project/index.html
index 3105d68..344e85a 100644
--- a/week-3-project/index.html
+++ b/week-3-project/index.html
@@ -18,10 +18,10 @@
-
+
-
+
@@ -30,7 +30,7 @@
+