- update: add initial wtv-capability-flags decoding, as well as wtv-tricks:/info demonstration
- update: rename classes
- minor update: quirky 'Special Thanks' in each custom class.
- minor update: notice about Initial Shared Key and multiple minisrvs
- update: wtv-music:/demo/index: update wtv-star image paths
- update: app.js: fix unencrypted post
- update: app.js: improve buffering and cleanup in attempt to fix occasional 'double-up' bug
- update: info.js: remove debug dump of capabilities
- Update: add test.js, syntax-testing script for `npm test`
- Update: wtv-chat:/home experimental nick change page thanks to MattMan (chat still giving issues on real boxes, works in Viewer)
- Update: README.md: Add ways to support the project
This commit is contained in:
zefie
2021-07-25 03:19:19 -04:00
parent 89f1b896e1
commit a5806e8581
15 changed files with 573 additions and 33 deletions

View File

@@ -0,0 +1,37 @@
class WTVClientSessionData {
/***********************************\
|* Special Thanks to: *|
|* No one *|
|* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *|
|* There is literally nothing *|
|* special about this class *|
\***********************************/
data_store = null;
constructor() {
this.data_store = new Array();
}
get(key = null) {
if (typeof (this.data_store) === 'undefined') return null;
else if (key === null) return this.data_store;
else if (this.data_store[key]) return this.data_store[key];
else return null;
}
set(key, value) {
if (key === null) throw ("ClientSessionData.set(): invalid key provided");
if (typeof (this.data_store) === 'undefined') this.data_store = new Array();
this.data_store[key] = value;
}
delete(key) {
if (key === null) throw ("ClientSessionData.delete(): invalid key provided");
delete this.data_store[key];
}
}
module.exports = WTVClientSessionData;