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
trusty-festivity-extension-2.3.3 node_modules/bower/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/set.js
trusty-festivity-extension-2.3.2 node_modules/bower/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/set.js
trusty-festivity-extension-2.3.1 node_modules/bower/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/set.js
trusty-festivity-extension-2.3.0 node_modules/bower/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/set.js
opal-0.9.0.beta2 stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/set.js
opal-0.9.0.beta1 stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/set.js
opal-0.8.1 stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/set.js
eslint_node_modules-1.6.0.1 vendor/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/set.js
eslint_node_modules-1.6.0 vendor/node_modules/eslint/node_modules/js-yaml/lib/js-yaml/type/set.js
opal-0.8.1.rc1 stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/set.js
opal-wedge-0.9.0.dev stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/set.js
opal-0.8.0 stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/set.js
opal-0.8.0.rc3 stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/set.js
opal-0.8.0.rc2 stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/set.js
opal-0.8.0.rc1 stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/set.js
opal-0.8.0.beta1 stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/set.js
opal-0.7.2 stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/set.js
entangled-0.0.16 spec/dummy/public/node_modules/bower/node_modules/insight/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/set.js
entangled-0.0.16 spec/dummy/public/node_modules/bower/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/set.js
entangled-0.0.15 spec/dummy/public/node_modules/bower/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/set.js