Skip to content

Commit 5d792b7

Browse files
authored
0.2.0 - rename to cosovo (#28)
* rename csv-range to cosovo * upgrade deps * Publish v0.2.0
1 parent 9b222aa commit 5d792b7

5 files changed

Lines changed: 535 additions & 465 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## [0.2.0]
4+
5+
- renamed csv-range to cosovo
6+
37
## [0.1.1]
48

59
- add keywords to package.json

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
# csv-range
1+
# cosovo
22

3-
[![npm](https://img.shields.io/npm/v/csv-range)](https://www.npmjs.com/package/csv-range)
4-
[![minzipped](https://img.shields.io/bundlephobia/minzip/csv-range)](https://www.npmjs.com/package/csv-range)
5-
[![workflow status](https://github.com/severo/csv-range/actions/workflows/ci.yml/badge.svg)](https://github.com/severo/csv-range/actions)
3+
[![npm](https://img.shields.io/npm/v/cosovo)](https://www.npmjs.com/package/cosovo)
4+
[![minzipped](https://img.shields.io/bundlephobia/minzip/cosovo)](https://www.npmjs.com/package/cosovo)
5+
[![workflow status](https://github.com/severo/cosovo/actions/workflows/ci.yml/badge.svg)](https://github.com/severo/cosovo/actions)
66
[![mit license](https://img.shields.io/badge/License-MIT-orange.svg)](https://opensource.org/licenses/MIT)
77
![coverage](https://img.shields.io/badge/Coverage-100-darkred)
8-
[![dependencies](https://img.shields.io/badge/Dependencies-0-blueviolet)](https://www.npmjs.com/package/csv-range?activeTab=dependencies)
8+
[![dependencies](https://img.shields.io/badge/Dependencies-0-blueviolet)](https://www.npmjs.com/package/cosovo?activeTab=dependencies)
99

1010
Fetch and parse ranges of CSV file.
1111

1212
## Install
1313

1414
```bash
15-
npm install csv-range
15+
npm install cosovo
1616
```
1717

1818
## Usage
1919

2020
Parse a remote CSV file from a URL:
2121

2222
```typescript
23-
import { parseURL } from 'csv-range'
23+
import { parseURL } from 'cosovo'
2424
const url = 'https://data.source.coop/severo/csv-papaparse-test-files/sample.csv'
2525
const rows = []
2626
for await (const { row } of parseURL(url)) {
@@ -37,7 +37,7 @@ The `parseURL` function yields an object for each row with the following propert
3737
- `errors`: array of parsing errors found in the row.
3838
- `meta`: object with metadata about the parsing process.
3939

40-
The format is described on the doc pages: https://severo.github.io/csv-range/interfaces/ParseResult.html.
40+
The format is described on the doc pages: https://severo.github.io/cosovo/interfaces/ParseResult.html.
4141

4242
The `row` field might contain fewer or more columns than expected, depending on the CSV content. It can be an empty array for empty rows. It's up to the user to handle these cases. The library does not trim whitespace from values, and it does not convert types.
4343

@@ -49,19 +49,19 @@ The `meta` field provides the `delimiter` and `newline` strings, detected automa
4949

5050
The `parseURL` function accepts an optional second argument with options.
5151

52-
It can contain options for [fetching](https://severo.github.io/csv-range/interfaces/FetchOptions.html) the CSV file, for [guessing](https://severo.github.io/csv-range/interfaces/GuessOptions.html) the delimiter and newline characters, and for [parsing](https://severo.github.io/csv-range/interfaces/ParseOptions.html) the CSV content.
52+
It can contain options for [fetching](https://severo.github.io/cosovo/interfaces/FetchOptions.html) the CSV file, for [guessing](https://severo.github.io/cosovo/interfaces/GuessOptions.html) the delimiter and newline characters, and for [parsing](https://severo.github.io/cosovo/interfaces/ParseOptions.html) the CSV content.
5353

5454

5555
## Examples
5656

57-
Find some examples of usage below. You can also find them in the [examples](https://github.com/severo/csv-range/tree/main/examples/) directory, and run them with `npm run examples`.
57+
Find some examples of usage below. You can also find them in the [examples](https://github.com/severo/cosovo/tree/main/examples/) directory, and run them with `npm run examples`.
5858

5959
### Only the first 10 rows
6060

6161
As the library uses async iterators, it's easy to stop parsing after a certain number of rows:
6262

6363
```typescript
64-
import { parseURL } from 'csv-range'
64+
import { parseURL } from 'cosovo'
6565
const url = 'https://data.source.coop/severo/csv-papaparse-test-files/verylong-sample.csv'
6666
const rows = []
6767
let count = 0
@@ -80,7 +80,7 @@ console.log(rows)
8080
You can fetch only a specific byte range of the CSV file, to parse only a part of it. This is useful for large files.
8181

8282
```typescript
83-
import { parseURL } from 'csv-range'
83+
import { parseURL } from 'cosovo'
8484
const url = 'https://data.source.coop/severo/csv-papaparse-test-files/verylong-sample.csv'
8585
const fetchOptions = {
8686
firstByte: 30_000,
@@ -93,14 +93,14 @@ for await (const { row } of parseURL(url, { fetch: fetchOptions })) {
9393
console.log(rows)
9494
```
9595

96-
Use the `result.meta.byteOffset` and `result.meta.byteCount` fields to know the exact byte range of each parsed row, and adjust your fetching strategy accordingly. See the [examples](https://github.com/severo/csv-range/tree/main/examples/) for an in-depth look.
96+
Use the `result.meta.byteOffset` and `result.meta.byteCount` fields to know the exact byte range of each parsed row, and adjust your fetching strategy accordingly. See the [examples](https://github.com/severo/cosovo/tree/main/examples/) for an in-depth look.
9797

9898
### Parse a string
9999

100100
You can also parse a CSV string directly with the `parseString` function:
101101

102102
```typescript
103-
import { parseText } from 'csv-range'
103+
import { parseText } from 'cosovo'
104104
const csvString = 'A,B,C\nX,Y,Z'
105105
const rows = []
106106
for await (const { row } of parseText(csvString)) {

0 commit comments

Comments
 (0)