getters.js 206 B

12345678
  1. export function recentHistory (state) {
  2. const end = state.history.length
  3. const begin = end - 5 < 0 ? 0 : end - 5
  4. return state.history
  5. .slice(begin, end)
  6. .toString()
  7. .replace(/,/g, ', ')
  8. }