How to use the getobject.set function in getobject

To help you get started, we’ve selected a few getobject examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github damkraw / grunt-gitinfo / tasks / gitInfo.js View on Github external
function (err, result) {
                        if (err) {
                            grunt.log.debug("Couldn't set config:", conf_key);
                        } else {
                            getobject.set(gitinfo, conf_key, result.stdout);

                            if (grunt.option("verbose")) {
                                // could be unnecessary
                                grunt.verbose.ok(conf_key, "=", result.stdout);
                            } else {
                                grunt.log.debug(conf_key, "=", result.stdout);
                            }
                        }
                        cb();
                    }
                );
github tkellen / js-expander / index.js View on Github external
var API = function (prop, value) {
    if (arguments.length === 2) {
      emitter.emit('set', prop, value);
      return getobject.set(data, prop, value);
    } else {
      return expander.get(data, prop, options);
    }
  };
  API.on = emitter.on.bind(emitter);
github assemble / assemble / lib / cache.js View on Github external
Cache.prototype.set = function set(key, value, resolve) {
  if (arguments.length === 1 && typeOf(key) === 'object') {
    this.process(key);
    this.emit('set', key, value);
    return this;
  }

  if (typeOf(value) === 'object') {
   	this.process(value);
  }

  value = expand(this.cache, value);
  if (resolve) {
    expander.set(this.cache, key, value);
  } else {
    getobject.set(this.cache, key, value);
  }

  this.emit('set', key, value);
  return this;
};
github tkellen / js-expander / index.js View on Github external
expander.set = function (data, lookup, value) {
  return getobject.set(data, lookup, value);
};

getobject

get.and.set.deep.objects.easily = true

MIT
Latest version published 3 years ago

Package Health Score

53 / 100
Full package analysis

Popular getobject functions