Version 1
[yaffs-website] / node_modules / grunt / node_modules / js-yaml / lib / js-yaml / type / js / undefined.js
diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js
new file mode 100644 (file)
index 0000000..95b5569
--- /dev/null
@@ -0,0 +1,28 @@
+'use strict';
+
+var Type = require('../../type');
+
+function resolveJavascriptUndefined() {
+  return true;
+}
+
+function constructJavascriptUndefined() {
+  /*eslint-disable no-undefined*/
+  return undefined;
+}
+
+function representJavascriptUndefined() {
+  return '';
+}
+
+function isUndefined(object) {
+  return typeof object === 'undefined';
+}
+
+module.exports = new Type('tag:yaml.org,2002:js/undefined', {
+  kind: 'scalar',
+  resolve: resolveJavascriptUndefined,
+  construct: constructJavascriptUndefined,
+  predicate: isUndefined,
+  represent: representJavascriptUndefined
+});