UNPKG

@uppy/audio

Version:

Uppy plugin that records audio using the device’s microphone.

7 lines 259 B
/** * Takes an Integer value of seconds (e.g. 83) and converts it into a * human-readable formatted string (e.g. '1:23'). */ export default function formatSeconds(seconds) { return `${Math.floor(seconds / 60)}:${String(seconds % 60).padStart(2, '0')}`; }