"use strict";

module.exports = function canvasToBlob(canvas, mimeType) {
	// FIXME: Validation
	return new Promise((resolve, _reject) => {
		canvas.toBlob(function(blob) {
			resolve(blob);
		}, mimeType);
	});
};
