super-base-64
v0.0.3
Published
Simple one-function-library to encode a Blob image in base64
Downloads
46
Maintainers
Readme
super-base-64
- Simple one-function-library to encode a Blob image in
base64
; - Promise based (just use
async/await
to use sync, don't panic); - Works with the Browser API;
Install
npm install super-base-64
Usage
- Async/Await style:
import superBase64 from 'super-base-64';
mammaMia = async (file) => {
let itsAMeMario = await superBase64(file);
console.log(itsAMeMario); // logs the image file encoded in base64
}
- Promise style:
import superBase64 from 'super-base-64';
mammaMia = (file) => {
superBase64(file).then((encoded) => console.log(encoded)); // logs the image file encoded in base64
}