I fixed #899. The major problem is due to lack of FileReader in Node.
I also cleaned the logic of converting a blob into an array buffer. Note the fact: FileReader.prototype.readAsArrayBuffer and Blob.prototype.arrayBuffer essentially does the same thing, but the former uses callback while the latter uses promise. Also, because File inherits Blob, we do not need to specially take care of File.
I fixed #899. The major problem is due to lack of
FileReader
in Node.I also cleaned the logic of converting a blob into an array buffer. Note the fact:
FileReader.prototype.readAsArrayBuffer
andBlob.prototype.arrayBuffer
essentially does the same thing, but the former uses callback while the latter uses promise. Also, becauseFile
inheritsBlob
, we do not need to specially take care ofFile
.npm run test
seems fine. Tests all pass.