« get me outta code hell

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:
Diffstat (limited to 'src/data/yaml.js')
-rw-r--r--src/data/yaml.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/data/yaml.js b/src/data/yaml.js
index 7ba6d559..0519986b 100644
--- a/src/data/yaml.js
+++ b/src/data/yaml.js
@@ -640,6 +640,16 @@ export function parseDuration(string) {
   }
 }
 
+export function parseAlwaysReferenceByDirectory(value) {
+  if (value === true) {
+    return 'always';
+  } else if (value === false) {
+    return 'normally';
+  } else {
+    return value;
+  }
+}
+
 export const extractAccentRegex =
   /^(?<main>.*?)(?: \((?<accent>.*)\))?$/;