A JavaScript helper to force downloading file in the browser
npm install @fvilers/force-download
or
yarn add @fvilers/force-download
const forceDownload = require('@fvilers/force-download');
forceDownload('https://somewhere.org/document.pdf', 'A file to download');