UNPKG

ember-alexandria

Version:

Document management frontend for the alexandria backend

8 lines (6 loc) 229 B
import { DateTime } from "luxon"; export function isDownloadUrlExpired(url) { const expiryRegex = /expires=([0-9]+)/; const match = url.match(expiryRegex); return DateTime.fromSeconds(Number(match[1])) < DateTime.now(); }