@idlebox/node-json-edit

Edit json file with comments (jsonc), reformat or preserve it's original format.

Usage no npm install needed!

<script type="module">
  import idleboxNodeJsonEdit from 'https://cdn.skypack.dev/@idlebox/node-json-edit';
</script>

README

node-json-edit

A tool for read and write json file with comments.

Additional:

  • Insert property at alphabet order, not at last.
  • Re-sort keys (in any order you want).
  • Format file with prettier. auto load prettier config. can override with argument.

prettier: http://prettier.io/

Usage

See: