I have used Sheet.js and FileSaver.js to implements downloads.
I think you can use your code with FileSave.js (https://github.com/eligrey/FileSaver.js/).
For FileSave to work in Aura components, you have to add the line:
window.saveAs = saveAs;
after the definition of the variable "saveAs" (after line 275 in FileSaver.js). Because imported libraries in Aura are encapsulated/something like that. I think it's a locker security thing.