fmtjson

Format json files.

Usage no npm install needed!

<script type="module">
  import fmtjson from 'https://cdn.skypack.dev/fmtjson';
</script>

README

fmtjson

Build Status npm Version JS Standard

Format json files.

Installation

$ npm install fmtjson --save

Usage

Format json files.

'use strict'

const fmtjson = require('fmtjson')

fmtjson([
  'src/**/*.json'
], {
  sort: true
}).then(() => {
  /* ... */
})

Options

Key Description Default
indent Number of indent 2
sort Sort properties or not. false
mode File permission '644'

License

This software is released under the MIT License.