node package manager

gulp-csv-to-json-array

A gulp plugin for transforming CSV files to JSON 2D arrays

gulp-csv-to-json-array

A gulp plugin for transforming CSV files to JSON 2D arrays

Syntax

csvParser([options])

Usage

csvParser = require('gulp-csv-to-json-array');
 
gulp.src(['./assets/**/*.csv'])
    .pipe(csvParser({
        dynamicTyping: true,
        skipEmptyLines: true
    }))
    .pipe(gulp.dest("./dist"));

By default the following CSV:

a,b,c,d
1,2,3,4

Will generate a 2D array:

[
    ["a", "b", "c", "d"],
    [1, 2, 3, 4]
]

Options documentation

Notes