The Vue plugin works by adding all the code that was instructed to be used to the Vue application layer (like a mixin).
When we used Vue.use() to import our plugin, we told Vue to call the install() function on the object of the imported file and executed it. Vue will automatically pass the current Vue as the first argument, and the options (if you declare them) as the second argument.
In our plugin, when the install() function is called, we first create baseOptions, merging the default options with the passed parameter, then we inject two new properties into the Vue prototype. Those properties are now available everywhere because the Vue parameter that was passed is the Vue global being used in the application.
Our generateStorageObject is a pure abstraction of the Storage API of the browser. We use it as a generator for our prototypes inside the plugin.