diff options
| 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 |
| commit | 35b914a82cf032db71275d85acdd4348b4a6cb66 (patch) | |
| tree | b2360d03189f12a43c771673befbd3f60d91581a /src/data/yaml.js | |
| parent | fa489724532926c83bf066a10c746334d4b1024f (diff) | |
yaml: flipBoolean
Diffstat (limited to 'src/data/yaml.js')
| -rw-r--r-- | src/data/yaml.js | 8 |
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); } |