JS-Cookie-Vue
A simple, lightweight Vue plugin for handling cookies
- Why reinvent the wheel?
Instead of making yet another cookie-handling library, JS-Cookie-Vue uses the popular JavaScript Cookie library (with over 16k stars ⭐️ at the time of writing) to handle all the cookie logic. Guarenteeing its bullet-proofness - Minimal and robust Vue.js plugin wrapper, making this the easiest way to integrate safe cookies into your application
- (obligatory) Blazing fast 💨
Use
As easy as
// main.js; Vue
// component.vue this$cookies// use `getJSON` to automatically parse complex valuesthis$cookies // ===['test', 'value']
Please see JavaScript Cookie documentation for all uses.
Config
// main.js ; Vue
Please see JavaScript Cookie documentation for all attribute options.
Inspired by js-cookie
and vue-cookies