Skip to content

Commit

Permalink
Load preferences from JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeche committed Jun 15, 2012
1 parent c514dba commit 4f6eb44
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions javascript/preferences.js
Expand Up @@ -109,6 +109,17 @@ zen_coding.define('preferences', function(require, _) {
});
},

/**
* Loads user-defined preferences from JSON
* @param {Object} json
* @returns
*/
load: function(json) {
_.each(json, function(value, key) {
this.set(key, value);
}, this);
},

/**
* For unit testing: use empty storage
*/
Expand Down

0 comments on commit 4f6eb44

Please sign in to comment.