4 ms·
fwiw, I don't think this should be a class. It could just be: const createJSONBlob = (obj) => new Blob([JSON.stringify(obj)], { type : 'application/json' }
by jaffathecake 5y ago
fwiw, I don't think this should be a class. It could just be:
const createJSONBlob = (obj) => new Blob([JSON.stringify(obj)], { type : 'application/json' });
- janpot 5y agoSure, makes sense in this case, without any other extra functionality in the class. But there could be more functionality needed. It feels highly subjective to me.