Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@bytesoftio/helpers-file

bytesoftio11MIT1.0.0TypeScript support: included

Installation

readme

@bytesoftio/helpers-file

Installation

yarn add @bytesoftio/helpers-file or npm install @bytesoftio/helpers-file

Table of contents

Description

Collection of file related helpers.

Usage

downloadAsFile

Download any kind of data as a file (works only in browser).

import { downloadAsFile } from "@bytesoftio/helpers-file"

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

downloadAsFile(fileName, data)