A tiny JavaScript Library. It Download data in your choosen file type. It'll create a button, and download data in file.
targetNode (required) - Dom Element. Button will be created in this dom element.
id (required) - unique Button ID.
data (required) - Data that will be downloaded.
fileType (optional) - Default: text/plain.
fileExtension (optional) - Default: .txt
className (optional) - Default: ''
buttonText (optional) - Default: Button
const expt = document.querySelector('.export');
const options = {
targetNode: expt,
id: 'exporto',
data: 'Apple,Orange,Pineapple',
fileType: 'text/csv',
fileExtension: '.csv',
className: 'export-btn',
buttonText: 'Export'
}
Exporto( options ).loaded();