Skip to content

finnp/ndjson2table

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ndjson2table

Transform NDJSON to an HTML table.

You can install it as a CLI with npm install ndjson2table -g or use it programmatically. However only the CLI includes the NDJSON parsing.

The NDJSON data has to include Objects, where each object has the same keys.

CLI Usage

Create an HTML file from NDJSON data:

ndjson2table < data.ndjson > data.html

Node

Here's the same in Node. Note that you can simply pipe objects to ndjson2table.

var ndjson2table = require('ndjson2table')
var fs = require('fs')
var ndjson = require('ndjson')

fs.createReadStream('data.ndjson')
  .pipe(ndjson.parse())
  .pipe(ndjson2table())
  .pipe(fs.createWriteStream('data.html'))

About

Create an HTML table from NDJSON

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published