Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 15x 15x 439x 439x 3512x 2862x 439x | import { UNITS } from './units'; import { Duration } from '../types'; export const cleanDurationObject = (duration: Readonly<Duration>): Readonly<Duration> => { const output = { ...duration }; UNITS.forEach(key => { // Convert `-0` to `0`. Both values will evaluate as `true` here. if (output[key] === 0) { output[key] = 0; } }); return output; }; |