Skip to content

Commit

Permalink
docs: up @csv-js/csv readme
Browse files Browse the repository at this point in the history
  • Loading branch information
eddieyg committed Jan 31, 2023
1 parent e51846d commit 400e321
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 5 deletions.
64 changes: 60 additions & 4 deletions packages/csv/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,64 @@
# @csv-js/csv
Main module for processing with Csv.
# CsvJs
A js library specialized in processing csv data.

## Usage
## ✨ Features

```
- Parse csv format
- Serialized csv format
- Csv data CRUD
- Browser download csv

## 📦︎ Packages

- `@csv-js/csv` A class specialized in processing csv data.
- `@csv-js/core` The core module for processing csv.
- `@csv-js/type` Generic types for csv-js packsge.

## 👨‍💻 Usage

### Install

```shell
npm install @csv-js/csv --save
```

### Example

```typescript
import Csv from '@csv-js/csv'

const header = [
{
key: 'name',
label: 'Name'
},
{
key: 'age',
}
]
const csv = new Csv(header, { name: 'test' })

csv.append([
{
name: 'eddie',
age: 20
},
{
name: 'jojo',
age: 18
}
])

csv.toString() // 'Name,age\r\neddie,20\r\njojo,18'

// Browser download csv
csv.download()
```

## 📃 Documentation

To be perfected.

## License

Licensed under the [MIT License](LICENSE).
2 changes: 1 addition & 1 deletion packages/csv/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@csv-js/csv",
"version": "0.0.1",
"version": "0.0.2",
"description": "Main module for processing with Csv.",
"main": "dist/index.js",
"module": "dist/index.mjs",
Expand Down

0 comments on commit 400e321

Please sign in to comment.