Initial commit
[yaffs-website] / node_modules / js-yaml / lib / js-yaml / type / js / undefined.js
1 'use strict';
2
3 var Type = require('../../type');
4
5 function resolveJavascriptUndefined() {
6   return true;
7 }
8
9 function constructJavascriptUndefined() {
10   /*eslint-disable no-undefined*/
11   return undefined;
12 }
13
14 function representJavascriptUndefined() {
15   return '';
16 }
17
18 function isUndefined(object) {
19   return typeof object === 'undefined';
20 }
21
22 module.exports = new Type('tag:yaml.org,2002:js/undefined', {
23   kind: 'scalar',
24   resolve: resolveJavascriptUndefined,
25   construct: constructJavascriptUndefined,
26   predicate: isUndefined,
27   represent: representJavascriptUndefined
28 });