2017-06-03 03:25:02 +08:00
|
|
|
const humanizeSeconds = (time) => {
|
2016-11-29 03:48:02 +08:00
|
|
|
const minutes = Math.floor(time / 60);
|
|
|
|
const seconds = time % 60;
|
|
|
|
return [
|
|
|
|
minutes,
|
|
|
|
seconds,
|
|
|
|
].map(x => (x < 10) ? `0${x}` : x).join(':');
|
|
|
|
};
|
|
|
|
|
|
|
|
export {
|
|
|
|
humanizeSeconds,
|
|
|
|
};
|