import localStore from '@/localStore' ; export default ( store ) : Function => { return store . subscribe ( ( mutation , state ) => { if ( mutation . type . indexOf ( '/' ) > - 1 ) { const moduleName = mutation . type . split ( '/' ) [ 0 ] ; localStore . setItem ( moduleName , state [ moduleName ] ) ; } } ) ; } ;