import bus from 'bus'
import Store from 'localstorage-ns'

export default function plugin (app) {
  const localStorage = Store('settings', {
    serverURI: 'bloxparty-server.kvnneff.me',
    nick: ''
  })

  localStorage.on('change', () => app.set('settings', localStorage.get()))

  bus.on('settings:set', (key, value) => localStorage.set(key, value))

  app.set('settings', localStorage.data)
}

@@ -346,17 +346,16 @@
 value))%0A
-%0A
   app.se
@@ -385,12 +385,13 @@
 age.
-data
+get()
 )%0A%7D%0A

Use localStorage.get() to set initial data.