add global filter

This commit is contained in:
jb-alvarado 2020-04-13 21:34:47 +02:00
parent 3f2f09597f
commit cc0d1ba51b

View File

@ -0,0 +1,7 @@
import Vue from 'vue'
Vue.filter('toMin', function (sec) {
const minutes = Math.floor(sec / 60)
const seconds = Math.round(sec - minutes * 60)
return `${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')} min`
})