summaryrefslogtreecommitdiff
path: root/node_modules/yaml/browser/dist/schema/common/null.js
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-04-09 18:38:29 +0200
committerMinteck <contact@minteck.org>2022-04-09 18:38:29 +0200
commit457c93328f5b51b3fc0aa1600ce8eb8b45a5c2a9 (patch)
treea899daf11edb7ce6a99700e462a5740e013f5951 /node_modules/yaml/browser/dist/schema/common/null.js
downloadsnowjail-457c93328f5b51b3fc0aa1600ce8eb8b45a5c2a9.tar.gz
snowjail-457c93328f5b51b3fc0aa1600ce8eb8b45a5c2a9.tar.bz2
snowjail-457c93328f5b51b3fc0aa1600ce8eb8b45a5c2a9.zip
Snowjail v0.1
Diffstat (limited to 'node_modules/yaml/browser/dist/schema/common/null.js')
-rw-r--r--node_modules/yaml/browser/dist/schema/common/null.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/node_modules/yaml/browser/dist/schema/common/null.js b/node_modules/yaml/browser/dist/schema/common/null.js
new file mode 100644
index 0000000..fcbe1b7
--- /dev/null
+++ b/node_modules/yaml/browser/dist/schema/common/null.js
@@ -0,0 +1,15 @@
+import { Scalar } from '../../nodes/Scalar.js';
+
+const nullTag = {
+ identify: value => value == null,
+ createNode: () => new Scalar(null),
+ default: true,
+ tag: 'tag:yaml.org,2002:null',
+ test: /^(?:~|[Nn]ull|NULL)?$/,
+ resolve: () => new Scalar(null),
+ stringify: ({ source }, ctx) => typeof source === 'string' && nullTag.test.test(source)
+ ? source
+ : ctx.options.nullStr
+};
+
+export { nullTag };