File size: 304 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
import moment from 'moment';
import { ResponseDomain } from './types';

export function isExpiringSoon(
	domain: ResponseDomain,
	expiresWithinDays: moment.DurationInputArg1
) {
	return (
		! domain.expired &&
		moment.utc( domain.expiry ).isBefore( moment.utc().add( expiresWithinDays, 'days' ) )
	);
}