🚀 Launch Week Day 4:Introducing the Alert Details Page: A Better Way to Explore Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

format-package-json

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

format-package-json

Format package.json based on the current one

Source
npmnpm
Version
0.0.3
Version published
Weekly downloads
102
131.82%
Maintainers
1
Weekly downloads
 
Created
Source

format-package-json

Module attempts to detect the spacing used, the final line ending and if it's comma first or not.

It will then attempt to reformat an Object back into this string and save the file.

usage


var format = require('format-package-json')


format('/path/to/package.json', function (err, data) {
    //data - the string that it wrote

    //That's it
})

sync

  • format.sync
  • format.readSync
  • format.writeSync

build

Build Status

Keywords

format

FAQs

Package last updated on 17 Feb 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts