> For the complete documentation index, see [llms.txt](https://docs.corets.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.corets.io/helpers/save-helpers.md).

# Save Helpers

Source code is hosted on [GitHub](https://github.com/corets/save-helpers)

{% tabs %}
{% tab title="yarn" %}

```bash
yarn add @corets/save-helpers
```

{% endtab %}

{% tab title="npm" %}

```
npm install --save @corets/save-helpers
```

{% endtab %}
{% endtabs %}

## saveAsFile() <a href="#saveasfile" id="saveasfile"></a>

Save any kind of data as a file (works only in the browser):

```typescript
import { saveAsFile } from "@corets/save-helpers"

const fileName = "data.csv"
const data = "name,age\nJohn,30\nSnow,40"

saveAsFile(fileName, data)
```
