Download wp-calypso/client/lib/domains/utils/is-expiring-soon.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 218 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/lib/domains/utils/is-expiring-soon.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/lib/domains/utils/is-expiring-soon.js
-
curl -L -o is-expiring-soon.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/lib/domains/utils/is-expiring-soon.js
218 Bytes
| import moment from 'moment'; | |
| export function isExpiringSoon( domain, expiresWithinDays ) { | |
| return ( | |
| ! domain.expired && | |
| moment.utc( domain.expiry ).isBefore( moment.utc().add( expiresWithinDays, 'days' ) ) | |
| ); | |
| } | |