save-json-file
v1.0.0
Published
Save a JSON object to a file.
Readme
save-json-file
Save a JSON object to a file.
Installation
yarn add save-jsonUsage
This package exports a function accepting two parameters:
- json: the json object to save
- filename (optional, defaults to "untitled"): the file name
Example:
import saveJSON from 'save-json-file';
saveJSON([
{
label: 'Publish npm package',
isDone: false
},
{
label: 'Write some documentation',
isDone: false
}
], 'todos');