Home Reference Source

src/utils/time-ranges.ts

  1. /**
  2. * TimeRanges to string helper
  3. */
  4.  
  5. const TimeRanges = {
  6. toString: function (r: TimeRanges) {
  7. let log = '';
  8. const len = r.length;
  9. for (let i = 0; i < len; i++) {
  10. log += `[${r.start(i).toFixed(3)}-${r.end(i).toFixed(3)}]`;
  11. }
  12.  
  13. return log;
  14. },
  15. };
  16.  
  17. export default TimeRanges;