summaryrefslogtreecommitdiff
path: root/node_modules/js-yaml/lib/schema
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/js-yaml/lib/schema')
-rw-r--r--node_modules/js-yaml/lib/schema/core.js11
-rw-r--r--node_modules/js-yaml/lib/schema/default.js22
-rw-r--r--node_modules/js-yaml/lib/schema/failsafe.js17
-rw-r--r--node_modules/js-yaml/lib/schema/json.js19
4 files changed, 69 insertions, 0 deletions
diff --git a/node_modules/js-yaml/lib/schema/core.js b/node_modules/js-yaml/lib/schema/core.js
new file mode 100644
index 0000000..608b26d
--- /dev/null
+++ b/node_modules/js-yaml/lib/schema/core.js
@@ -0,0 +1,11 @@
+// Standard YAML's Core schema.
+// http://www.yaml.org/spec/1.2/spec.html#id2804923
+//
+// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.
+// So, Core schema has no distinctions from JSON schema is JS-YAML.
+
+
+'use strict';
+
+
+module.exports = require('./json');
diff --git a/node_modules/js-yaml/lib/schema/default.js b/node_modules/js-yaml/lib/schema/default.js
new file mode 100644
index 0000000..3af0520
--- /dev/null
+++ b/node_modules/js-yaml/lib/schema/default.js
@@ -0,0 +1,22 @@
+// JS-YAML's default schema for `safeLoad` function.
+// It is not described in the YAML specification.
+//
+// This schema is based on standard YAML's Core schema and includes most of
+// extra types described at YAML tag repository. (http://yaml.org/type/)
+
+
+'use strict';
+
+
+module.exports = require('./core').extend({
+ implicit: [
+ require('../type/timestamp'),
+ require('../type/merge')
+ ],
+ explicit: [
+ require('../type/binary'),
+ require('../type/omap'),
+ require('../type/pairs'),
+ require('../type/set')
+ ]
+});
diff --git a/node_modules/js-yaml/lib/schema/failsafe.js b/node_modules/js-yaml/lib/schema/failsafe.js
new file mode 100644
index 0000000..b7a33eb
--- /dev/null
+++ b/node_modules/js-yaml/lib/schema/failsafe.js
@@ -0,0 +1,17 @@
+// Standard YAML's Failsafe schema.
+// http://www.yaml.org/spec/1.2/spec.html#id2802346
+
+
+'use strict';
+
+
+var Schema = require('../schema');
+
+
+module.exports = new Schema({
+ explicit: [
+ require('../type/str'),
+ require('../type/seq'),
+ require('../type/map')
+ ]
+});
diff --git a/node_modules/js-yaml/lib/schema/json.js b/node_modules/js-yaml/lib/schema/json.js
new file mode 100644
index 0000000..b73df78
--- /dev/null
+++ b/node_modules/js-yaml/lib/schema/json.js
@@ -0,0 +1,19 @@
+// Standard YAML's JSON schema.
+// http://www.yaml.org/spec/1.2/spec.html#id2803231
+//
+// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.
+// So, this schema is not such strict as defined in the YAML specification.
+// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc.
+
+
+'use strict';
+
+
+module.exports = require('./failsafe').extend({
+ implicit: [
+ require('../type/null'),
+ require('../type/bool'),
+ require('../type/int'),
+ require('../type/float')
+ ]
+});