Open jimmywarting opened 3 years ago
It feels like you could just do
this.push(Buffer.from(reader.result))
You are using the FileReader and it will always return a ArrayBuffer... You are not getting any unknown typed arrays from any other sources.
https://github.com/DamonOehlman/filestream/blob/f5c9d3c54da5e2d0793827e7d530f961d5362cb9/read.js#L4 https://github.com/DamonOehlman/filestream/blob/f5c9d3c54da5e2d0793827e7d530f961d5362cb9/read.js#L22 https://github.com/DamonOehlman/filestream/blob/f5c9d3c54da5e2d0793827e7d530f961d5362cb9/read.js#L67
It feels like you could just do
You are using the FileReader and it will always return a ArrayBuffer... You are not getting any unknown typed arrays from any other sources.
https://github.com/DamonOehlman/filestream/blob/f5c9d3c54da5e2d0793827e7d530f961d5362cb9/read.js#L4 https://github.com/DamonOehlman/filestream/blob/f5c9d3c54da5e2d0793827e7d530f961d5362cb9/read.js#L22 https://github.com/DamonOehlman/filestream/blob/f5c9d3c54da5e2d0793827e7d530f961d5362cb9/read.js#L67