1.2.1 • Published 3 years ago

savejsontofile v1.2.1

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

savejsontofile

npm i savejsontofile

Usage

saveJsonToFile(
  {
    name: 'Karthick',
    occupation: 'Web Developer',
  }, // Json object
  'output.json', // Output path
  false, // Flatten
)

Output file

// output.json

{"name":"Karthick","occupation":"Web Developer"}

It helps to easily export the logs or complex objects to a file to debug easily. The library also comes with flattening support that helps fix TypeError: Converting circular structure to JSON error.

1.2.1

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago