node-query/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/js-yaml/benchmark/implementations/js-yaml-3.2.1/lib/js-yaml/type/js/undefined.js

28 lines
539 B
JavaScript

'use strict';
var Type = require('../../type');
function resolveJavascriptUndefined() {
return true;
}
function constructJavascriptUndefined() {
return undefined;
}
function representJavascriptUndefined() {
return '';
}
function isUndefined(object) {
return 'undefined' === typeof object;
}
module.exports = new Type('tag:yaml.org,2002:js/undefined', {
kind: 'scalar',
resolve: resolveJavascriptUndefined,
construct: constructJavascriptUndefined,
predicate: isUndefined,
represent: representJavascriptUndefined
});