« 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.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/data/yaml.js b/src/data/yaml.js
index 60017b3d..cce2bbf0 100644
--- a/src/data/yaml.js
+++ b/src/data/yaml.js
@@ -621,6 +621,14 @@ export class SubdocAggregateError extends AggregateError {
   }
 }
 
+export function flipBoolean(value) {
+  if (typeof value === 'boolean') {
+    return !value;
+  } else {
+    return value;
+  }
+}
+
 export function parseDate(date) {
   return new Date(date);
 }