UNPKG

@hazae41/glacier

Version:

Yet another React data (re)fetching library

43 lines (41 loc) 1.05 kB
'use strict'; exports.Time = void 0; (function (Time) { function fromDelay(delay) { if (delay == null) return; return Date.now() + delay; } Time.fromDelay = fromDelay; function toDelay(time) { if (time == null) return; return time - Date.now(); } Time.toDelay = toDelay; function isBefore(left, right) { if (left == null) return; if (right == null) return; return left < right; } Time.isBefore = isBefore; function isAfter(left, right) { if (left == null) return; if (right == null) return; return left > right; } Time.isAfter = isAfter; function isBeforeNow(time) { return isBefore(time, Date.now()); } Time.isBeforeNow = isBeforeNow; function isAfterNow(time) { return isAfter(time, Date.now()); } Time.isAfterNow = isAfterNow; })(exports.Time || (exports.Time = {})); //# sourceMappingURL=time.cjs.map