Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

base64toblob

miguelmota3.2kMIT0.0.2

Base64 to Blob object

base64, blob

readme

base64ToBlob

Convert a base64 string to a Blob object.

Demo

https://lab.miguelmota.com/base64toblob

Install

bower install base64toblob
npm install base64toblob

Usage

var base64 = 'iVBORw0...ASUVORK5CYII=';

var blob = base64ToBlob(base64, 'image/png');
var url = window.URL.createObjectURL(blob);

console.log(url); // blob:http%3A//localhost%3A8888/2c6321f4-8f4e-457f-8b4e-2c3932b4bef0

License

MIT