All files / shared release.ts

100% Statements 4/4
100% Branches 0/0
100% Functions 1/1
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 52x 2x   4x  
const NEW_DAYS = 14
const DAY_MS = 86_400_000
 
export const isNew = (released: string, now: Date) => now.getTime() - Date.parse(released) < NEW_DAYS * DAY_MS