vue-preferences

The coolest and easiest way to manage your user's preferences on the client side with your preferred storage. Check out sample app here:

MIT License

Downloads
2.5K
Stars
96
Committers
5

Bot releases are hidden (Show)

vue-preferences - Namespaces, Serialization, Expiration and more! Latest Release

Published by fedekau almost 5 years ago

This version has been re-written from scratch in order to allow possible contributors to more easily add new storage options. With this refactor adding new options is as easy as adding a file (and of course testing it), all contributions are welcome!

New Features 🍾 πŸŽ‰ :

  • ExpirableStorage adds the ability to expire preferences see #71
  • NamespaceableStorage it allows your preferences to be namespaced
  • SerializableStorage it allows you to provide custom serializer/deserializer functions to handle you you preferences in custom ways, the default is JSON, but you can provide CSV, binary, etc.
  • All options can be provided globally or locally

Breaking ChangesπŸ’₯:

  • Previously all preferences would use the vp namespace, so if you want to be able to use already saved preferences you will need to add namespace: 'vp' to you options
  • If you provide some kind of custom storage you now need to ensure a removeItem method is available.

Bug Fixes πŸ›:

  • The preferences in the programatic way didn't worked properly, now they do!
vue-preferences - Custom storage

Published by fedekau about 5 years ago

This release enables you to use any custom storage you want, by default localStorage will be used. You can use sessionStorage or others, you only need to provide an object with a getItem and setItem that have the same API/behavior of localStorage.

Allow to use custom storage (#27 by @fedekau)
Other minor updates

This is a backwards compatible release because we keep the default storage with no change required.

Enjoy πŸŽ‰

vue-preferences - Reactive preferences

Published by fedekau over 5 years ago

This release enables reactivity to the preferences by default, this means that now, every-time a preference changes from somewhere else in the code all other properties or templates that depend on it will get re-rendered/re-computed.

  • Add reactive option to the api (#14 by @fedekau)
  • Other minor updates

This is a BREAKING release because in the previous versions preferences where not reactive, and although the API is backwards compatible the behaviour is not!

Enjoy πŸŽ‰

Package Rankings
Top 8.16% on Npmjs.org
Related Projects