blob-to-arraybuffer

0.0.1 • Public • Published

blob-to-arraybuffer

Promise API to turn a Blob into an ArrayBuffer

Install

$ npm install --save blob-to-arraybuffer

Usage

const blobToArrayBuffer = require("blob-to-arraybuffer");
 
blobToArrayBuffer(blob).then(buffer => {
    // hurrah!
});

with fetch

fetch("file.dat")
.then(res => res.blob)
.then(blobToArrayBuffer)
.then(buffer => {
 
});

/blob-to-arraybuffer/

    Package Sidebar

    Install

    npm i blob-to-arraybuffer

    Weekly Downloads

    25

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • montyanderson