-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
61 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters