UNPKG

util-helpers

Version:

一个基于业务场景的工具方法库

8 lines (6 loc) 285 B
function setDataURLPrefix(data, mimeType, base64) { if (mimeType === void 0) { mimeType = 'image/png'; } if (base64 === void 0) { base64 = true; } return "data:".concat(mimeType).concat(base64 ? ';base64' : '', ",").concat(data); } export { setDataURLPrefix as default };