Promise based module to read DOM Blob content
npm install @rdbird/dom-file --save
- Flowtype support: static type annotation with Flow.
- Promise based API:
- Better composability than event based
FileReader
- Allow use of
async
/await
latest async feature
- Better composability than event based
import { readAsDataURL } from '@rdbird/dom-file';
async function readData(blobFile: Blob) {
const dataURLContent = await readAsDataURL(blobFile);
// Do something...
return dataURLContent;
}
This project is licensed under the MIT License