lib/profile.js
function addPrefs(profile, options) {
  var userPrefs = options.prefs || {};

  return when.promise(function(resolve, reject) {
    Object.keys(userPrefs).forEach(function(key) {
      profile.setPreference(key, userPrefs[key]);
    });
    profile.updatePreferences();
    resolve(profile);
  });
}
function addPrefs(profile, options) {
  var userPrefs = options.prefs || {};

  return when.promise(function(resolve, reject) {
    Object.keys(userPrefs).forEach(function(key) {
      profile.setPreference(key, userPrefs[key]);
    });
    profile.updatePreferences();
    resolve(profile);
  });
}
function addPrefs ( profile , options ) { var userPrefs = options . prefs || { } ; return when . promise ( function ( resolve , reject ) { Object . keys ( userPrefs ) . forEach ( function ( key ) { profile . setPreference ( key , userPrefs [ key ] ) ; } ) ; profile . updatePreferences ( ) ; resolve ( profile ) ; } ) ; }
Set any of the preferences passed via options.
Set any of the preferences passed via options .