Skip to content

siculars/node-tsv-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-tsv-json

Build Status

convert tsv to json format.

Install

  npm install node-tsv-json

Usage

  tsv = require("node-tsv-json");
  tsv({
    input: "sample.tsv", 
    output: "output.json"
    //array of arrays, 1st array is column names
    //,compress: 1
  }, function(err, result) {
    if(err) {
      console.error(err);
    }else {
      console.log(result);
    }
  });

In config object, you have to enter an input path. But If you don't want to output any file you can set to null.

Add compress: 1 to the config object to output an array of arrays where the first element is an array of column names followed by arrays of values.

License

MIT @chilijung

About

convert tsv to json

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published