1.0.0 • Published 4 years ago

@necessarylion/csv2array v1.0.0

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

CSV to ARRRAY

npm install @necessarylion/csv2array --save

Usage

import csv2array from '@necessarylion/csv2array'

let file = document.getElementById("your-input-field-id")
csv2array.file ({file : file , seperator: ','}, res => {
    console.log(res);
})

let string = 'number;first;last;handle\n1;Mark;Otto;@mdo\n2;Jacob;Thornton;@fat\n3;Larry;the Bird;@twitter\n';
csv2array.string ({string : string , seperator: ','}, res => {
    console.log(res);
})

url  = 'path/to/file.csv';
csv2array.url({url : url , seperator: ','}, res => {
    console.log(res);
});