Skip to content

Latest commit

 

History

History

dom-file

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

RdBird Project

DOM File

NPM Version Build Status License

Promise based module to read DOM Blob content

Getting started

Installation

npm install @rdbird/dom-file --save

Features

  • Flowtype support: static type annotation with Flow.
  • Promise based API:
    • Better composability than event based FileReader
    • Allow use of async/await latest async feature

Usage

import { readAsDataURL } from '@rdbird/dom-file';

async function readData(blobFile: Blob) {
  const dataURLContent = await readAsDataURL(blobFile);
  // Do something...
  return dataURLContent;
}

License

This project is licensed under the MIT License

Acknowledgements