@veltdev/sdk
Version:
Velt is an SDK to add collaborative features to your product within minutes. Example: Comments like Figma, Frame.io, Google docs or sheets, Recording like Loom, Huddles like Slack and much more.
2 lines (1 loc) • 606 B
JavaScript
import{a as m}from"./chunk-WTYACTR5.js";import{Pa as c,Xa as f}from"./chunk-GR3NESUB.js";var l=(()=>{let t=class t{constructor(r){this.translateService=r}transform(r,...i){try{let n=(new Date().getTime()-new Date(r).getTime())/1e3;if(n<1)return this.translateService.translate("now");let s={y:31536e3,mo:2592e3,w:604800,d:86400,h:3600,m:60,s:1};for(let a in s){let o=Math.floor(n/s[a]);if(o>0)return`${o}${this.translateService.translate(a)}`}return r}catch{return r}}};t.\u0275fac=function(i){return new(i||t)(c(m,16))},t.\u0275pipe=f({name:"timeAgo",type:t,pure:!0});let e=t;return e})();export{l as a};