Sha256: fd6e912ebc50fe030a0de29d648ee95df8213dc4874c36ceb88c75d5929ce7b1

Contents?: true

Size: 575 Bytes

Versions: 112

Compression:

Stored size: 575 Bytes

Contents

'use strict';

var Type = require('../type');

var _hasOwnProperty = Object.prototype.hasOwnProperty;

function resolveYamlSet(data) {
  if (null === data) {
    return true;
  }

  var key, object = data;

  for (key in object) {
    if (_hasOwnProperty.call(object, key)) {
      if (null !== object[key]) {
        return false;
      }
    }
  }

  return true;
}

function constructYamlSet(data) {
  return null !== data ? data : {};
}

module.exports = new Type('tag:yaml.org,2002:set', {
  kind: 'mapping',
  resolve: resolveYamlSet,
  construct: constructYamlSet
});

Version data entries

112 entries across 105 versions & 6 rubygems

Version Path
opal-0.9.0.rc1 stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/set.js
trusty-festivity-extension-2.3.22 node_modules/bower/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/set.js
trusty-festivity-extension-2.3.21 node_modules/bower/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/set.js
trusty-festivity-extension-2.3.20 node_modules/bower/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/set.js
trusty-festivity-extension-2.3.19 node_modules/bower/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/set.js
trusty-festivity-extension-2.3.18 node_modules/bower/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/set.js
trusty-festivity-extension-2.3.17 node_modules/bower/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/set.js
trusty-festivity-extension-2.3.16 node_modules/bower/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/set.js
trusty-festivity-extension-2.3.15 node_modules/bower/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/set.js
trusty-festivity-extension-2.3.14 node_modules/bower/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/set.js
trusty-festivity-extension-2.3.13 node_modules/bower/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/set.js
trusty-festivity-extension-2.3.12 node_modules/bower/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/set.js
trusty-festivity-extension-2.3.11g node_modules/bower/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/set.js
trusty-festivity-extension-2.3.10 node_modules/bower/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/set.js
trusty-festivity-extension-2.3.9 node_modules/bower/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/set.js
trusty-festivity-extension-2.3.8 node_modules/bower/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/set.js
trusty-festivity-extension-2.3.7 node_modules/bower/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/set.js
trusty-festivity-extension-2.3.6 node_modules/bower/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/set.js
trusty-festivity-extension-2.3.5 node_modules/bower/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/set.js
trusty-festivity-extension-2.3.4 node_modules/bower/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/set.js