removed unnecessary method + doc within Settings Framework

This commit is contained in:
FrissDieGurke
2014-05-04 12:34:22 +02:00
parent aea8d50200
commit c23df60e1b
2 changed files with 1 additions and 110 deletions

View File

@@ -27,7 +27,7 @@ function trim(obj1, obj2) {
function mergeSettings(cfg, defCfg) {
if (typeof cfg._settings !== typeof defCfg || typeof defCfg !== 'object') {
return cfg._settings = defCfg;
cfg._settings = defCfg;
} else {
expandObjBy(cfg._settings, defCfg);
trim(cfg._settings, defCfg);
@@ -103,22 +103,6 @@ Settings.prototype.persist = function (callback) {
return this;
};
/**
Persists the settings if no settings are saved.
@param callback Gets called when done.
*/
Settings.prototype.persistOnEmpty = function (callback) {
var _this = this;
meta.settings.get(this.hash, function (err, settings) {
if (!settings._settings) {
_this.persist(callback);
} else if (typeof callback === 'function') {
callback.call(_this);
}
});
return this;
};
/**
Returns the setting of given key or default value if not set.
@param key The key of the setting to return.