All files / src/helpers is-date-after-now.ts

75% Statements 3/4
66.67% Branches 2/3
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 5 6 7 8 91x       84x   84x    
export default function isDateAfterNow (
  date: number | Date,
  delay = 0
): boolean {
  Iif (date instanceof Date) date = date.getTime();
 
  return date > Date.now() + delay;
}