diff --git a/lib/index.js b/lib/index.js index 754c687..2f84236 100644 --- a/lib/index.js +++ b/lib/index.js @@ -276,8 +276,14 @@ function arrayBufferToBlob(buffer, type) { * @returns {Promise} Promise that resolves with the ArrayBuffer */ function blobToArrayBuffer(blob) { - return blobToBinaryString(blob).then(function (binary) { - return binaryStringToArrayBuffer(binary); + return new Promise(function (resolve, reject) { + var reader = new FileReader(); + reader.onloadend = function (e) { + var result = e.target.result || new ArrayBuffer(0); + resolve(result); + }; + reader.onerror = reject; + reader.readAsArrayBuffer(blob); }); } diff --git a/package.json b/package.json index 0ddba05..cb0d024 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,6 @@ "dependencies": { "blob": "0.0.4", "es3ify": "^0.1.3", - "jsdoc": "^3.3.0-alpha10", "lie": "^2.6.0" }, "devDependencies": {