@fntio/infra-client
Version:
Self-hosted AWS access portal: credential vending, target-account trust, and grant-driven private networking as CDK stacks and constructs.
2 lines (1 loc) • 740 B
JavaScript
var i=[1,12,24,72,168,720];function s(t){if(t<24)return t===1?"1 hour":`${t} hours`;if(t===168)return"1 week";let n=Math.round(t/24);return n===1?"1 day":`${n} days`}function c(t){let n=Math.max(0,Math.floor(t/1e3)),o=Math.floor(n/3600),a=Math.floor(n%3600/60),r=String(n%60).padStart(2,"0");return o>0?`${o}:${String(a).padStart(2,"0")}:${r}`:`${a}:${r}`}function u(t,n=Date.now()){let o=new Date(t).getTime()-n,a=Math.abs(o),r=Math.max(1,Math.round(a/6e4)),e=r<60?`${r}m`:r<1440?`${Math.round(r/60)}h`:`${Math.round(r/1440)}d`;return o>=0?`in ${e}`:`${e} ago`}function m(t){if(t<=0)return"0m";let n=Math.floor(t/6e4);if(n<1)return"<1m";let o=Math.floor(n/60),a=n%60;return o>0?`${o}h ${a}m`:`${a}m`}export{i as a,s as b,c,u as d,m as e};