Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

fmtjson

okunishinishi7kMIT5.0.2

Format json files.

file, json, format

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.