getStyles({}, e => { let styles = JSON.stringify(e); let link = document.createElement('a'); let data = new Blob([styles], {type: 'text/plain;charset=utf-8;'}); link.href = window.URL.createObjectURL(data); link.setAttribute('download', 'styles.json'); document.body.appendChild(link); link.click(); document.body.removeChild(link); });