« get me outta code hell

data: Group.serieses - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/yaml.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-10-14 16:36:04 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-11-02 22:12:45 -0300
commit21a5a2f69cba27506252d1947e6eb61699c9b811 (patch)
tree916339c5664de0fb389400b5bc186b72c231cc30 /src/data/yaml.js
parentfb319c8e0bf69d9925389edf674de938ea489e25 (diff)
data: Group.serieses
Diffstat (limited to 'src/data/yaml.js')
-rw-r--r--src/data/yaml.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/data/yaml.js b/src/data/yaml.js
index be59080e..f5394752 100644
--- a/src/data/yaml.js
+++ b/src/data/yaml.js
@@ -465,6 +465,18 @@ export function parseAdditionalNames(entries) {
   });
 }
 
+export function parseSerieses(entries) {
+  return parseArrayEntries(entries, item => {
+    if (typeof item !== 'object') return item;
+
+    return {
+      name: item['Name'],
+      description: item['Description'] ?? null,
+      albums: item['Albums'] ?? null,
+    };
+  });
+}
+
 export function parseDimensions(string) {
   // It's technically possible to pass an array like [30, 40] through here.
   // That's not really an issue because if it isn't of the appropriate shape,