git-csv

0.0.0 • Public • Published

git-csv

The Easiest Way to Get the Rows from a CSV on Github

usage

Getting a CSV from a Public Repo

const gitCSV = require('git-csv');

const rows = gitCSV({
    url: 'https://github.com/org/repo/blob/master/folder/example.csv'
});
// rows is like [ [ 5, 389, 'HARVARD UNIV', 'Ames Hall', true ], ...]

Getting a CSV from a Private Repo

const gitCSV = require('git-csv');

const rows = gitCSV({
    accessToken: '12ye7taslasudfbhkyjasvfjysdce621tcu6ertc12y5r',
    url: https://github.com/org/repo/blob/master/folder/example.csv
});

Getting a CSV with a Header

const gitCSV = require('git-csv');

const rows = gitCSV({
    header: true,
    url: https://github.com/org/repo/blob/master/folder/example.csv
});
// rows is like [ { team_name: 'Celtics', location: 'Boston' }, ...]

Readme

Keywords

Package Sidebar

Install

npm i git-csv

Weekly Downloads

1

Version

0.0.0

License

CC0-1.0

Unpacked Size

11.1 kB

Total Files

5

Last publish

Collaborators

  • danieljdufour