MIT licensed source code: <a href="https://github.com/eligrey/FileSaver.js" rel="nofollow">https://github.com/eligrey/FileSaver.js</a><p>In case it's not clear, this allows you to generate a file from client-side JS, and allow the user to save the generated file <i>without first having to upload the generated file to the server</i>.