simple-image-cdn
Version:
Simple and free image CDN
3 lines (2 loc) • 729 B
JavaScript
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e=e||self).simpleImageCdn=n()}(this,function(){function e(){return(e=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}var n={w:640,h:640,fit:"cover"};return function(t,o){void 0===o&&(o={});try{return"https://images.weserv.nl/?url="+window.encodeURIComponent(window.decodeURIComponent(t))+function(t){var o="";return Object.entries(e({},n,t)).forEach(function(e){o=o+"&"+e[0]+"="+e[1]}),o}(o)}catch(e){return null}}});
//# sourceMappingURL=index.umd.js.map