@bloxbean/yaci-viewer
Version:
A Cardano blockchain data viewer for developers. It works with the Yaci-Store backend, supporting both a local devnet and public networks.
2 lines (1 loc) • 383 B
JavaScript
function u(n,t,e){if(!n)return"";if(n.length<=t)return n;e=e||"...";var o=e.length,r=t-o,c=Math.ceil(r/2),i=Math.floor(r/2);return n.substr(0,c)+e+n.substr(n.length-i)}function h(n){if(!n)return"";const t=new Date(n*1e3),e={year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1};return t.toLocaleString(void 0,e)}export{h as g,u as t};