UNPKG
seniorvu-sdk
Version:
latest (3.0.1)
3.0.1
3.0.0
2.3.0
2.2.0
2.1.0
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
1.1.3
1.1.2
1.1.1
1.1.0
1.0.7
1.0.6
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
0.0.0
JS wrapper SDK for the SeniorVu web API
github.com/softvu/seniorvu-sdk
softvu/seniorvu-sdk
seniorvu-sdk
/
src
/
expires-soon.js
6 lines
(5 loc)
•
216 B
JavaScript
View Raw
1
2
3
4
5
6
// Check if the expiration time is within a day
export
default
function
expiresSoon
(
expireAt
) {
if
(
typeof
expireAt ===
'undefined'
)
return
true
;
return
(
new
Date
(expireAt) -
new
Date
()) <
1000
*
60
*
60
*
24
; }