base64toblob

0.0.2 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i base64toblob

Weekly Downloads

890

Version

0.0.2

License

MIT

Last publish

Collaborators

  • miguelmota