text: !function(n){"function"==typeof define&&define.amd?define(n):n()}(function(){var n={TYPES:["ascii","utf8","random"],DEFAULT:"random",ascii:{alreadyMunged:function(n){if(n.startsWith("&#"))return n},munge:function(n){return n&&n.charCodeAt()}},utf8:{alreadyMunged:function(n){if(n.startsWith("&#x"))return n},munge:function(e){for(var r=n.ascii.munge(e).toString(16).toUpperCase();r.length<4;)r="0"+r;return"x"+r}},random:{alreadyMunged:function(e){return n.ascii.alreadyMunged(e)||n.utf8.alreadyMunged(e)},munge:function(e){var r=n.TYPES[Math.floor(Math.random()*n.TYPES.length)];return n[r].munge(e)}}};module.exports=function(e,r){var i,t,o=[];if((r=r||{}).encoding){if(n.TYPES.indexOf(r.encoding)<0)throw Error("Invalid encoding option given: "+r.encoding)}else r.encoding=n.DEFAULT;var u=n[r.encoding];if(e){if(u.alreadyMunged(e))return e;for(t in i=e.split(""))o[t]="&#"+u.munge(i[t])+";"}return o.join("")}});
  //# sourceMappingURL=munge.umd.js.map
  