Beispiel #1
0
export function activeState ({ vuex: { base, history, activeIndex }}) {
  const entry = history[activeIndex]
  const res = {}
  if (entry) {
    res.type = entry.mutation.type
    res.payload = CircularJSON.parse(entry.mutation.payload)
  }
  res.state = CircularJSON.parse(entry ? entry.state : base)
  return res
}
Beispiel #2
0
export function parse (data, revive) {
  return revive
    ? CircularJSON.parse(data, reviver)
    : CircularJSON.parse(data)
}
Beispiel #3
0
 bridge.on('vuex:travel-to-state', state => {
   hook.emit('vuex:travel-to-state', CircularJSON.parse(state))
 })