@naturalcycles/json2html

Render arbitrary json as human-friendly html. CLI and API.

Usage no npm install needed!

<script type="module">
  import naturalcyclesJson2html from 'https://cdn.skypack.dev/@naturalcycles/json2html';
</script>

README

@naturalcycles/json2html

Render arbitrary json as human-friendly html. CLI and API. Inspired by json.human.js

npm code style: prettier

Why

Sometimes you need to render some report to non-technical people, but too lazy to create a custom html/css template for it. Just throw your json into this library and enjoy the good-enough result.

Install

yarn add @naturalcycles/json2html

Examples

Sample output


# Render `my.json` to `my.json.html`
json2html my.json

# Render all json files in `someDir`
json2html 'someDir/**/*.json'

Packaging

  • engines.node >= 14.15: Latest Node.js LTS
  • main: dist/index.js: commonjs, es2020
  • types: dist/index.d.ts: typescript types
  • /src folder with source *.ts files included