ember-preferences
ember-preferences copied to clipboard
Add advanced methods to preferences service
Right now the API to interact with preferences from the application code is very limited. The idea is to add advanced methods to the service so we can execute other business rules when getting/setting values.
-
preferences.setItem(key, value, options)sets a key and value to the store-
options.serializefalseto skip serialization (if available)
-
-
preferences.getItem(key, options)retrieves a value from the store -
preferences.removeItem(key, options)removes a key/value from the store -
preferences.clear(options)removes all keys (those that matches the namespace) from the store
The options object will be used later by the decorators to receive options so we can change the behavior (an example is opting-out from serialize adapter).