param secs const secondsToTime = ( secs ) => { const hours = Math . floor ( secs / ( 60 * 60 ) ) ; const divisorForMinutes = secs % ( 60 * 60 ) ; const minutes = Math . floor ( divisorForMinutes / 60 ) ; const divisorForSeconds = divisorForMinutes % 60 ; const seconds = Math . ceil ( divisorForSeconds ) ; const obj = { hours , minutes , seconds } ; return obj ; } ; param param0 const hmsToTimeStamp = ( { hours , minutes , seconds } ) => { const finalHour = hours > 9 ? `${ hours }` : `0${ hours }` ; const finalMins = minutes > 9 ? `${ minutes }` : `0${ minutes }` ; const finalSeconds = seconds > 9 ? `${ seconds }` : `0${ seconds }` ; return `${ finalHour }:${ finalMins }:${ finalSeconds }` ; } ; const getSecondsInTimeStamp = ( secs ) => { const hms = secondsToTime ( secs ) ; return hmsToTimeStamp ( hms ) ; } ; export default getSecondsInTimeStamp ; export { hmsToTimeStamp , secondsToTime } ;