HexagonJS
Preferences Changelog
2.1.0
Preferences
setup
Added
A method for re-initialising the preferences object with a new configuration.
Calling with no arguments returns it to the default configuration.
1.17.0
Preferences
applyTimezoneOffsetDate
Removed
Preferences
applyTimezoneOffsetDate
Added
Updated the offset argument to additionally take a timezone string directly instead of needing the numeric offset
Preferences
isLocaleSupportedBoolean
Added
Added a method for checking whether the locale is supported
Preferences
isTimezoneSupportedBoolean
Added
Added a method for checking whether the timezone is supported
1.8.0
Updated
#254
Added logic to update the current timezone in hx.preferences when not using Moment.js
1.4.1
Bugfix
#222
Fix an incorrectly named variable
Updated
Updated the default locale when using moment as moment doesn't guess the current locale correctly
1.4.0
Updated
#211
Updated the text to be defined in the userFacingText module
1.3.3
Bugfix
#251
Prefer navigator.languages over navigator.language
1.3.0
Bugfix
#133
Update the preferences default timezone lookup to work correctly with Moment.js
1.2.1
Updated
Improved the way preferences determines the locale when it is loaded so that it always uses a supported locale.
1.1.0
Preferences
timezonePreferences
Updated
#23
Updated the list of acceptable timezones and added a helper for converting a date to display with the currently set timezone.
Preferences
applyTimezoneOffsetDate
Added
#23
A method that takes a date and returns a new date with the timezone offset applied.
Preferences
supportedTimezonesArray[String]
Added
#23
A method for getting the currently supported timezones.
Preferences
supportedTimezonesPreferences
Added
#23
A method for setting the currently supported timezones.
Preferences
timezoneOffsetLookupFunction
Added
#23
A method for getting the timezoneOffsetLookup function
Preferences
timezoneOffsetLookupPreferences
Added
#23
A method for setting the timezoneOffsetLookup function
0.14.0
PreferencesextendsEventEmitter
Updated
Added the en-us locale to the list of valid locales
Preferences
localePreferences
Updated
locale will now log an error if you attempt to pass in an invalid locale.
Updated
locale now accepts undefined as the locale for clearning the user preference.
0.13.0
hx.preferencesUserPreferences
Removed
This has been replaced with the Preferences type
UserPreferencesextendsEventEmitter
Removed
This has been replaced with the Preferences type
PreferencesextendsEventEmitter
Added
A class for storing and retrieving user preferences such as timezone and locale preference.
hx.preferencesPreferences
Added
Global instance of Preferences
hx.preferences.localStorageStore
Added
The default backing store used by hx.preferences
0.12.0
UserPreferences
getPreferences
Removed
UserPreferences
setPreferences
Removed
0.11.0
UserPreferences
getPreferences
Deprecated
Use value(callback) instead.
UserPreferences
setPreferences
Deprecated
Use value(data, callback) instead.
UserPreferences
value
Added
Gets the users preferences
UserPreferences
value
Added
Sets the user preferences