From f2042886dd08b1fab6f7721c71aa75e405038d3c Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 13 Sep 2024 18:58:21 -0700 Subject: [PATCH] add comment --- src/enum.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/enum.js b/src/enum.js index 5576903bd..1997141f2 100644 --- a/src/enum.js +++ b/src/enum.js @@ -56,6 +56,10 @@ function Enum(name, values, options, comment, comments, valuesOptions) { */ this.valuesOptions = valuesOptions; + /** + * Values features, if any + * @type {Object>|undefined} + */ this._valuesFeatures = {}; /** @@ -151,16 +155,7 @@ Enum.prototype.add = function add(name, id, comment, options) { this.valuesOptions = {}; this.valuesOptions[name] = options || null; - // console.log(options) - // if (/features/.test(options)) { - // var features = Object.keys(this.valuesOptions).find(x => {return x.hasOwnProperty("features")}); - // this._valuesFeatures[name] = features ?? {}; - // console.log(this._valuesFeatures[name]) - // } - - console.log(this.valuesOptions) for (var key in this.valuesOptions) { - console.log(this.valuesOptions[key]) var features = Array.isArray(this.valuesOptions) ? this.valuesOptions[key].find(x => {return x.hasOwnProperty("features")}) : this.valuesOptions[key] === "features"; if (features) { if (!this._valuesFeatures) { @@ -171,9 +166,6 @@ Enum.prototype.add = function add(name, id, comment, options) { } } - - // console.log(this.valuesOptions) - this.comments[name] = comment || null; return this; };