# @layankumarasinghe/generate-react-cvs

> React js cvs generate

Latest version **1.0.3** (published 2024-07-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install @layankumarasinghe/generate-react-cvs
pnpm add @layankumarasinghe/generate-react-cvs
yarn add @layankumarasinghe/generate-react-cvs
bun add @layankumarasinghe/generate-react-cvs
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2024-07-01 |
| First published | 2023-11-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | layanKumarasinghe |
| Keywords | cvs, react, js, download |

## Links

- npm: https://www.npmjs.com/package/@layankumarasinghe/generate-react-cvs
- npm.io page: https://npm.io/package/@layankumarasinghe/generate-react-cvs

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.3 (latest) — 2024-07-01
- 1.0.2 — 2023-11-19
- 1.0.1 — 2023-11-19
- 1.0.0 — 2023-11-19

## README

# @layankumarasinghe/generate-react-csv

`@layankumarasinghe/generate-react-csv` is a simple utility for generating and downloading CSV (Comma-Separated Values) files in a React.js environment.

## Installation

```bash
npm install @layankumarasinghe/generate-react-csv

```


## Usage

```js

import React from 'react';
import generateCSV from '@layankumarasinghe/generate-react-csv';

const YourComponent = () => {
  // Example data
  const data = [
    { Name: 'John Doe', Age: 30, City: 'New York' },
    { Name: 'Jane Doe', Age: 25, City: 'San Francisco' },
    // Add more objects as needed
  ];

  // Handle CSV download
  const handleDownload = () => {
    generateCSV(data, 'exampleData');
  };

  return (
    <div>
      {/* Your React component content */}
      <button onClick={handleDownload}>Download CSV</button>
    </div>
  );
};

export default YourComponent;

```


## API

```
generateCSV(dataArray, fileName)

dataArray: An array of objects representing the data to be included in the CSV file.

fileName: A string representing the desired name for the generated CSV file.

```

---
_Source: https://npm.io/package/@layankumarasinghe/generate-react-cvs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
