UNPKG

simple-image-cdn

Version:
3 lines (2 loc) 548 B
function n(){return(n=Object.assign||function(n){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])}return n}).apply(this,arguments)}var r={w:640,h:640,fit:"cover"};module.exports=function(t,e){void 0===e&&(e={});try{return"https://images.weserv.nl/?url="+window.encodeURIComponent(window.decodeURIComponent(t))+function(t){var e="";return Object.entries(n({},r,t)).forEach(function(n){e=e+"&"+n[0]+"="+n[1]}),e}(e)}catch(n){return null}}; //# sourceMappingURL=index.js.map