Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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();
}
);
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);
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;
};
expander.set = function (data, lookup, value) {
return getobject.set(data, lookup, value);
};