save-pretty-json

1.0.3 • Public • Published

save-pretty-json

Simple module to save your json data pretty

Installation

npm install save-pretty-json ---save

Usage

    const prettyJson = require('save-pretty-json')
    
    prettyJson({
        filePath: './teste.json',
        data: {
            teste: 'data',
        },
        encoding: 'ISO-8859-1' // default is utf-8
    }).then(()=>{
        console.log('done')
    }).catch((err)=>{
        console.log(err)
    })

Readme

Keywords

Package Sidebar

Install

npm i save-pretty-json

Weekly Downloads

1

Version

1.0.3

License

ISC

Unpacked Size

2 kB

Total Files

4

Last publish

Collaborators

  • dellean.santos