From ecade0cd3e4bd998bd865164b51b8a4237599958 Mon Sep 17 00:00:00 2001 From: HoshinoKoji Date: Tue, 4 Mar 2025 21:24:21 +0800 Subject: [PATCH] Remove Item class and its associated methods --- src/item.js | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 src/item.js diff --git a/src/item.js b/src/item.js deleted file mode 100644 index 40d1a92..0000000 --- a/src/item.js +++ /dev/null @@ -1,28 +0,0 @@ -class Item { - static get TYPES() { - return ["text", "radio", "checkbox", "scale"]; - } - - constructor({type, title, optTexts, optValues = null}) { - this._title = title; - this._type = type; - this._texts = optTexts; - this._values = optValues; - this._response = null; - } - - static isValid({type, title, optTexts, optValues = null}) { - if (!title || !Item.TYPES.includes(type)) { - return false; - } - if (type === "text") { - return true; - } - if (optTexts && optValues && optTexts.length !== optValues.length) { - return false; - } - return true; - } -} - -export default Item; \ No newline at end of file