The `preferences-service` module provides access to the application-wide preferences service singleton. @function Sets the application preference `name` to `value`. @param name {string} Preference name. @param value {string,number,bool} Preference value. **Example:** var name = "extensions.checkCompatibility.nightly"; require("preferences-service").set(name, false); @function Gets the application preference `name`. @param name {string} @param defaultValue {string,number,bool} Preference value. @returns {string,number,bool} Preference value, returns a default value if no preference is set. **Example:** var name = "extensions.checkCompatibility.nightly"; var nightlyCompatChk = require("preferences-service").get(name); @function @param name {string} Preference name. @returns {bool} Returns whether or not the application preference `name` exists. **Example:** var name = "extensions.checkCompatibility.nightly"; if (require("preferences-service").has(name)) { // ... } @function @param name {string} Preference name. @returns {bool} Returns whether or not the application preference `name` both exists and has been set to a non-default value by the user (or a program acting on the user's behalf). **Example:** var name = "extensions.checkCompatibility.nightly"; if (require("preferences-service").isSet(name)) { // ... } @function Clears a non-default, user-set value from the application preference `name`. If no user-set value is defined on `name`, the function does nothing. If no default value exists the preference will cease to exist. @param name {string} Preference name. **Example:** var name = "extensions.checkCompatibility.nightly"; require("preferences-service").reset(name); @function Gets the localized value for an application preference `name`. @param name {string} @param defaultValue {string} Preference value. @returns {string} Localized preference value, returns a default value if no preference is set. Some preferences refer to a properties file. So that `prefs.get` returns the properties file URL whereas `prefs.getLocalized` returns the value defined in the properties file. **Example:** var prefs = require("preferences-service"); var name = "general.useragent.locale"; prefs.get(name); // is equal to "chrome://global/locale/intl.properties" prefs.getLocalized(name) // is equal to "en-US" @function Sets the localized application preference `name` to `value`. @param name {string} Preference name. @param value {string} Preference value, a URL to a properties file **Example:** require("preferences-service").set("general.useragent.locale", "chrome://global/locale/intl.properties");