1.0.1 • Published 10 years ago

ndjson2table v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

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'))
1.0.1

10 years ago

1.0.0

10 years ago