How to use file-saver

Comprehensive file-saver code examples:

How to use file-saver.default:

117
118
119
120
121
122
123
124
125
126
    }
}
/* istanbul ignore next */
function downloadFile(fileName, contentType, base64) {
    const blob = base64toBlob(base64, contentType);
    file_saver_1.default.saveAs(blob, fileName);
}
/* istanbul ignore next */
function base64toBlob(base64Data, contentType) {
    contentType = contentType || '';

How to use file-saver.saveAs:

62
63
64
65
66
67
68
69
70
71
export function NetlistModal ({ open, close, netlist }) {
  const netfile = useSelector(state => state.netlistReducer)
  const createNetlistFile = () => {
    const titleA = netfile.title.split(' ')[1]
    const blob = new Blob([netlist], { type: 'text/plain;charset=utf-8' })
    FileSaver.saveAs(blob, `${titleA}_eSim_on_cloud.cir`)
  }
  return (
    <Dialog
      open={open}