UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

2 lines (1 loc) 742 B
export function logBuildInfo(){const o=__BUILD_INFO__;if(o){const e=new Date(o.built);console.info("%c\u26A1\uFE0F[efp-runtime]%c v%c%s%c commit=%c%s%c branch=%c%s%c built=%c%s%c (%s)","color:#2382f4;font-weight:600","color:inherit","color:#dcdcaa;font-weight:600",o.version,"color:inherit","color:#9cdcfe",o.commit,"color:inherit","color:#ce9178",o.branch,"color:inherit","color:#b5cea8",o.built,"color:inherit",s(e))}}function s(o){const c=new Date().getTime()-o.getTime(),i=Math.floor(c/(1e3*60*60*24)),n=Math.floor(c/(1e3*60*60)%24),r=Math.floor(c/(1e3*60)%60),t=[];return i>0&&t.push(`${i} day${i!==1?"s":""}`),n>0&&t.push(`${n} hour${n!==1?"s":""}`),r>0&&t.push(`${r} minute${r!==1?"s":""}`),t.length===0?"just now":t.join(" ")+" ago"}