ember-preferences icon indicating copy to clipboard operation
ember-preferences copied to clipboard

Add advanced methods to preferences service

Open san650 opened this issue 9 years ago • 0 comments

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.serialize false to 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).

san650 avatar Jul 24 '16 23:07 san650