aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/managers/stats.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/managers/stats.js')
-rw-r--r--server/src/managers/stats.js59
1 files changed, 0 insertions, 59 deletions
diff --git a/server/src/managers/stats.js b/server/src/managers/stats.js
deleted file mode 100644
index 20f1ae3..0000000
--- a/server/src/managers/stats.js
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Simple generic stats collection script for events occurances (etc)
- *
- * Version: v2.0.0
- * Developer: Marzavec ( https://github.com/marzavec )
- * License: WTFPL ( http://www.wtfpl.net/txt/copying/ )
- *
- */
-
-class Stats {
- /**
- * Create a stats instance.
- *
- */
- constructor () {
- this._stats = {};
- }
-
- /**
- * Retrieve value of arbitrary `key` reference
- *
- * @param {String} key Reference to the arbitrary store name
- */
- get (key) {
- return this._stats[key];
- }
-
- /**
- * Set value of arbitrary `key` reference
- *
- * @param {String} key Reference to the arbitrary store name
- * @param {Number} value New value for `key`
- */
- set (key, value) {
- this._stats[key] = value;
- }
-
- /**
- * Increase value of arbitrary `key` reference, by 1 or `amount`
- *
- * @param {String} key Reference to the arbitrary store name
- * @param {Number} amount Value to increase `key` by, or 1 if omitted
- */
- increment (key, amount) {
- this.set(key, (this.get(key) || 0) + (amount || 1));
- }
-
- /**
- * Reduce value of arbitrary `key` reference, by 1 or `amount`
- *
- * @param {String} key Reference to the arbitrary store name
- * @param {Number} amount Value to decrease `key` by, or 1 if omitted
- */
- decrement (key, amount) {
- this.set(key, (this.get(key) || 0) - (amount || 1));
- }
-}
-
-module.exports = Stats;