« get me outta code hell

yaml: flipBoolean - 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>2026-05-19 16:14:20 -0300
committer(quasar) nebula <qznebula@protonmail.com>2026-05-19 16:14:20 -0300
commit35b914a82cf032db71275d85acdd4348b4a6cb66 (patch)
treeb2360d03189f12a43c771673befbd3f60d91581a /src/data/yaml.js
parentfa489724532926c83bf066a10c746334d4b1024f (diff)
yaml: flipBoolean
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);
 }