Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Load preferences from JSON

  • Loading branch information...
commit 4f6eb44d229757e9a53eaecc6ecb22fa9ab38d2c 1 parent c514dba
@sergeche sergeche authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 javascript/preferences.js
View
11 javascript/preferences.js
@@ -110,6 +110,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
*/
_startTest: function() {
Please sign in to comment.
Something went wrong with that request. Please try again.