1.0.3 • Published 10 months ago

easyblob v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months ago

EasyBlob

Convert a blob to base64 string in seconds.

Authors

Usage/Examples

import { blobToBase64 } from './node_modules/easyblob/index.js'

document.getElementById('fileInput').addEventListener('change', async (event) => {
    const file = event.target.files[0];
    
    if (file) {
        try {
            const base64String = await blobToBase64(file);
            document.getElementById('result').innerText = `Base64 String: ${base64String}`;
        } catch (err) {
            console.error('Error converting to base64:', err);
        }
    }
});
// ESM Node.js
import { blobToBase64 } from 'easyblob';
// CommonJS
const { blobToBase64 } = require('easyblob');

Installation

Install easyblob with npm

  npm i easyblob
1.0.2

10 months ago

1.0.1

10 months ago

1.0.3

10 months ago

1.0.0

4 years ago