save-json-file

1.0.0 • Public • Published

save-json-file

Save a JSON object to a file.

Installation

yarn add save-json

Usage

This package exports a function accepting two parameters:

  1. json: the json object to save
  2. 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');

Readme

Keywords

none

Package Sidebar

Install

npm i save-json-file

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

2.52 kB

Total Files

4

Last publish

Collaborators

  • gabinzhouzi