2. Create a Blob constructor, pass the data in it to be to save and mention the type of data.
3. And finally, call the saveAs(Blob object, "your-file-name. text") function of FileSaver. js library.