aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/utils/time.js
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2020-08-30 16:10:15 +1000
committerSam Potts <sam@potts.es>2020-08-30 16:10:25 +1000
commit18b3f23c694b9b3154788fa0f612621be8618a2b (patch)
tree3d0cf5a9ccd7f3082ac6b1b58480e135a6f18237 /src/js/utils/time.js
parent11e48b018157ac75f1db1cc433b7067a3d6ab522 (diff)
downloadplyr-18b3f23c694b9b3154788fa0f612621be8618a2b.tar.lz
plyr-18b3f23c694b9b3154788fa0f612621be8618a2b.tar.xz
plyr-18b3f23c694b9b3154788fa0f612621be8618a2b.zip
chore: update packages and linting
Diffstat (limited to 'src/js/utils/time.js')
-rw-r--r--src/js/utils/time.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/js/utils/time.js b/src/js/utils/time.js
index 31660c4a..36e0d59b 100644
--- a/src/js/utils/time.js
+++ b/src/js/utils/time.js
@@ -5,9 +5,9 @@
import is from './is';
// Time helpers
-export const getHours = value => Math.trunc((value / 60 / 60) % 60, 10);
-export const getMinutes = value => Math.trunc((value / 60) % 60, 10);
-export const getSeconds = value => Math.trunc(value % 60, 10);
+export const getHours = (value) => Math.trunc((value / 60 / 60) % 60, 10);
+export const getMinutes = (value) => Math.trunc((value / 60) % 60, 10);
+export const getSeconds = (value) => Math.trunc(value % 60, 10);
// Format time to UI friendly string
export function formatTime(time = 0, displayHours = false, inverted = false) {
@@ -17,7 +17,7 @@ export function formatTime(time = 0, displayHours = false, inverted = false) {
}
// Format time component to add leading zero
- const format = value => `0${value}`.slice(-2);
+ const format = (value) => `0${value}`.slice(-2);
// Breakdown to hours, mins, secs
let hours = getHours(time);
const mins = getMinutes(time);