MCPcopy Create free account
hub / github.com/TryCatchLearn/Overflow / timeAgo

Function timeAgo

webapp/src/lib/util.ts:49–51  ·  view source on GitHub ↗
(date: Date | string)

Source from the content-addressed store, hash-verified

47}
48
49export function timeAgo(date: Date | string): string {
50 return formatDistanceToNow(date, { addSuffix: true });
51}
52
53export function stripHtmlTags(html: string): string {
54 return html.replace(/<[^>]*>/g, '').trim();

Callers 2

QuestionCardFunction · 0.90
QuestionFooterFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…