UNPKG

@sofaws/dapp-core

Version:

A library to hold the main logic for a dapp on the Elrond Network

3 lines (2 loc) 691 B
import{j as n,m as c}from"./chunk-HBP5N4FR.js";c();function a(t){let o=!1,e=document==null?void 0:document.createElement("textarea");e.value=t,e.style.position="fixed",document==null||document.body.appendChild(e),e.focus(),e.select();try{document==null||document.execCommand("copy"),o=!0}catch(r){console.error("Fallback: Oops, unable to copy",r)}return document==null||document.body.removeChild(e),o}function u(t){return n(this,null,function*(){let o=!1;return navigator.clipboard?o=yield navigator.clipboard.writeText(t).then(function(){return!0},function(r){return console.error("Async: Could not copy text: ",r),!1}):o=a(t),o})}export{u as a}; //# sourceMappingURL=chunk-TNJOR5TD.js.map