Skip to content

severo/csv-range

Repository files navigation

csv-range

npm minzipped workflow status mit license coverage dependencies

Fetch and parse ranges of CSV file.

Early version

This is an early version. The API may change completely:

  • until version 0.1.0, breaking changes may be introduced at any time.
  • from version 0.1.0 to 1.0.0, breaking changes will be introduced only in minor versions.
  • from version 1.0.0, breaking changes will be introduced only in major versions.

Install

npm install csv-range

Usage

To parse a remote CSV file from a URL:

import { parseURL } from 'csv-range'
const rows = []
for await (const { row } of parseURL('https://data.source.coop/severo/csv-papaparse-test-files/sample.csv')) {
    rows.push(row)
}
console.log(rows)
// Output: [ [ 'A', 'B', 'C' ], [ 'X', 'Y', 'Z' ] ]

Thanks

The code is heavily inspired by Papaparse.

It has partly been funded by source.coop.

About

Fetch and parse ranges of a CSV file

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •