UNPKG

on-codemerge

Version:

A WYSIWYG editor for on-codemerge is a user-friendly interface that allows users to edit and view their code in real time, exactly as it will appear in the final product

2 lines (1 loc) 345 B
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function r(n){const o=new Date(n),t=Math.floor((new Date().getTime()-o.getTime())/1e3);return t<60?"just now":t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:t<604800?`${Math.floor(t/86400)}d ago`:o.toLocaleDateString()}exports.formatDate=r;