{"_id":"write-json","_rev":"59815","name":"write-json","description":"Write a JSON file to disk, also creates intermediate directories in the destination path if they don't already exist.","dist-tags":{"latest":"3.0.1"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T10:19:32.000Z","created":"2014-12-17T04:59:35.781Z","3.0.1":"2018-01-26T21:56:21.354Z","3.0.0":"2018-01-26T21:52:10.348Z","2.0.0":"2017-07-11T05:06:06.941Z","1.0.1":"2017-04-13T03:16:07.639Z","1.0.0":"2017-04-13T03:07:08.600Z","0.2.2":"2015-11-17T12:25:22.562Z","0.2.1":"2015-10-20T20:44:17.473Z","0.2.0":"2015-04-07T10:17:55.841Z","0.1.0":"2014-12-17T04:59:35.781Z"},"users":{"rshaw":true},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/write-json.git"},"versions":{"3.0.1":{"name":"write-json","description":"Write a JSON file to disk, also creates intermediate directories in the destination path if they don't already exist.","version":"3.0.1","homepage":"https://github.com/jonschlinkert/write-json","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/write-json.git"},"bugs":{"url":"https://github.com/jonschlinkert/write-json/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=4"},"scripts":{"test":"mocha"},"dependencies":{"isobject":"^3.0.1","write":"^1.0.3"},"devDependencies":{"delete":"^1.1.0","gulp-format-md":"^1.0.0","mocha":"^3.5.3"},"keywords":["async","buffer","data","file","file-system","filepath","files","filesystem","folder","format","fs","fs.createWriteStream","fs.writeFile","fs.writeFileSync","json","make-dir","make-dirp","mkdir","mkdirp","object","path","promise","read","stringify","sync","Uint8Array","write"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["delete","read-data","read-yaml","write","write-data","write-yaml"]},"lint":{"reflinks":true}},"gitHead":"f7e856b8d1ea3acbea0afff26cb8db7782798936","_id":"write-json@3.0.1","_npmVersion":"5.6.0","_nodeVersion":"9.1.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"dist":{"shasum":"6a5477dd01874e3c6af7e163414609a72d93bf56","size":4727,"noattachment":false,"key":"/write-json/-/write-json-3.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/write-json/download/write-json-3.0.1.tgz"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/write-json-3.0.1.tgz_1517003780331_0.10371464840136468"},"directories":{},"publish_time":1517003781354,"_hasShrinkwrap":false,"_cnpm_publish_time":1517003781354},"3.0.0":{"name":"write-json","description":"Write a JSON file to disk, also creates intermediate directories in the destination path if they don't already exist.","version":"3.0.0","homepage":"https://github.com/jonschlinkert/write-json","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/write-json.git"},"bugs":{"url":"https://github.com/jonschlinkert/write-json/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=4"},"scripts":{"test":"mocha"},"dependencies":{"isobject":"^3.0.1","write":"^1.0.3"},"devDependencies":{"delete":"^1.1.0","gulp-format-md":"^1.0.0","mocha":"^3.5.3"},"keywords":["async","buffer","data","file","file-system","filepath","files","filesystem","folder","format","fs","fs.createWriteStream","fs.writeFile","fs.writeFileSync","json","make-dir","make-dirp","mkdir","mkdirp","object","path","promise","read","stringify","sync","Uint8Array","write"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["delete","read-data","read-yaml","write","write-data","write-yaml"]},"lint":{"reflinks":true}},"gitHead":"c0a1b08519fcbf68dfc51c281799a6117c6b359f","_id":"write-json@3.0.0","_npmVersion":"5.6.0","_nodeVersion":"9.1.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"dist":{"shasum":"3dd9912e68a5409148a710e4bb269dacd84791ef","size":4735,"noattachment":false,"key":"/write-json/-/write-json-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/write-json/download/write-json-3.0.0.tgz"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/write-json-3.0.0.tgz_1517003529382_0.23875563056208193"},"directories":{},"publish_time":1517003530348,"_hasShrinkwrap":false,"_cnpm_publish_time":1517003530348},"2.0.0":{"name":"write-json","description":"Write a JSON file to disk, also creates intermediate directories in the destination path if they don't already exist.","version":"2.0.0","homepage":"https://github.com/jonschlinkert/write-json","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/write-json.git"},"bugs":{"url":"https://github.com/jonschlinkert/write-json/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=4"},"scripts":{"test":"mocha"},"dependencies":{"isobject":"^3.0.1","write":"^1.0.3"},"devDependencies":{"delete":"^1.1.0","gulp-format-md":"^1.0.0","mocha":"^3.4.2"},"keywords":["async","buffer","data","file","file-system","filepath","files","filesystem","folder","format","fs","fs.createWriteStream","fs.writeFile","fs.writeFileSync","json","make-dir","make-dirp","mkdir","mkdirp","object","path","promise","read","stringify","sync","Uint8Array","write"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["delete","read-data","read-yaml","write","write-data","write-yaml"]},"lint":{"reflinks":true}},"gitHead":"c362303b69f127a1cba8dd26ffa38c23be89fe84","_id":"write-json@2.0.0","_npmVersion":"5.2.0","_nodeVersion":"7.7.3","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"3dde8c39b27b840e87ef8b775aa94c15d4db2091","size":4578,"noattachment":false,"key":"/write-json/-/write-json-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/write-json/download/write-json-2.0.0.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/write-json-2.0.0.tgz_1499749566027_0.7340888802427799"},"directories":{},"publish_time":1499749566941,"_cnpm_publish_time":1499749566941,"_hasShrinkwrap":false},"1.0.1":{"name":"write-json","description":"Write a JSON file to disk, also creates intermediate directories in the destination path if they don't already exist.","version":"1.0.1","homepage":"https://github.com/jonschlinkert/write-json","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/write-json.git"},"bugs":{"url":"https://github.com/jonschlinkert/write-json/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"write":"^0.3.3"},"devDependencies":{"delete":"^0.3.2","gulp-format-md":"^0.1.12","mocha":"^3.2.0"},"keywords":["file","fs","json","object","package","path","pkg","stringify","write"],"verb":{"related":{"list":["delete","read-data","read-json","read-yaml","write","write-yaml"]},"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"lint":{"reflinks":true}},"gitHead":"b92b84711c44fff9de289b06bd317c73d2b94223","_id":"write-json@1.0.1","_shasum":"fca6856c9bf2f4f869fae9e2b55574dbdd048627","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.3","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"fca6856c9bf2f4f869fae9e2b55574dbdd048627","size":2790,"noattachment":false,"key":"/write-json/-/write-json-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/write-json/download/write-json-1.0.1.tgz"},"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/write-json-1.0.1.tgz_1492053366964_0.626362876733765"},"directories":{},"publish_time":1492053367639,"_hasShrinkwrap":false,"_cnpm_publish_time":1492053367639},"1.0.0":{"name":"write-json","description":"Write a JSON file to disk, also creates intermediate directories in the destination path if they don't already exist.","version":"1.0.0","homepage":"https://github.com/jonschlinkert/write-json","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/write-json.git"},"bugs":{"url":"https://github.com/jonschlinkert/write-json/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"write":"^0.3.3"},"devDependencies":{"delete":"^0.3.2","gulp-format-md":"^0.1.12","mocha":"^3.2.0"},"keywords":["file","fs","json","object","package","path","pkg","stringify","write"],"verb":{"related":{"list":["delete","read-data","read-json","read-yaml","write","write-yaml"]},"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"lint":{"reflinks":true}},"gitHead":"d6ff618864e25dfbc8a213366f09acf528859aad","_id":"write-json@1.0.0","_shasum":"9586dbd1d1a76128ddaf6564a2fabe7d7becee30","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.3","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"9586dbd1d1a76128ddaf6564a2fabe7d7becee30","size":2765,"noattachment":false,"key":"/write-json/-/write-json-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/write-json/download/write-json-1.0.0.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/write-json-1.0.0.tgz_1492052826564_0.8391058838460594"},"directories":{},"publish_time":1492052828600,"_cnpm_publish_time":1492052828600,"_hasShrinkwrap":false},"0.2.2":{"name":"write-json","description":"Write a JSON file to disk, also creates intermediate directories in the destination path if they don't already exist.","version":"0.2.2","homepage":"https://github.com/jonschlinkert/write-json","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/write-json.git"},"bugs":{"url":"https://github.com/jonschlinkert/write-json/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"write":"^0.2.1"},"devDependencies":{"delete":"^0.2.1","mocha":"*"},"keywords":["file","fs","json","object","package","path","pkg","stringify","write"],"verb":{"related":{"list":["delete","write","write-yaml","read-yaml","read-json","read-data"],"description":""}},"gitHead":"3d92ef3cce44e87d3dee9bcf3aab58a164252871","_id":"write-json@0.2.2","_shasum":"fa4e1529e9e763a4f92f07d9841317e3d248daf3","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"fa4e1529e9e763a4f92f07d9841317e3d248daf3","size":2209,"noattachment":false,"key":"/write-json/-/write-json-0.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/write-json/download/write-json-0.2.2.tgz"},"directories":{},"publish_time":1447763122562,"_cnpm_publish_time":1447763122562,"_hasShrinkwrap":false},"0.2.1":{"name":"write-json","description":"Write a JSON file to disk, also creates intermediate directories in the destination path if they don't already exist.","version":"0.2.1","homepage":"https://github.com/jonschlinkert/write-json","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/write-json.git"},"bugs":{"url":"https://github.com/jonschlinkert/write-json/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"write":"^0.2.1"},"keywords":["file","fs","json","object","package","path","pkg","stringify","write"],"devDependencies":{"delete":"^0.1.5","mocha":"^2.2.1"},"verb":{"related":{"description":"","list":[]}},"gitHead":"78db1af986afe924814d2cf3984af4d39f111662","_id":"write-json@0.2.1","_shasum":"fd2aed0b274abc9aaf2d8be5497562b52899b489","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"fd2aed0b274abc9aaf2d8be5497562b52899b489","size":2164,"noattachment":false,"key":"/write-json/-/write-json-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/write-json/download/write-json-0.2.1.tgz"},"directories":{},"publish_time":1445373857473,"_cnpm_publish_time":1445373857473,"_hasShrinkwrap":false},"0.2.0":{"name":"write-json","description":"Write a JSON to file disk, also creates directories in the dest path if they don't already exist.","version":"0.2.0","homepage":"https://github.com/jonschlinkert/write-json","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/write-json.git"},"bugs":{"url":"https://github.com/jonschlinkert/write-json/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/write-json/blob/master/LICENSE"},"files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"write":"^0.2.0"},"keywords":["file","fs","json","object","package","path","pkg","stringify","write"],"devDependencies":{"delete":"^0.1.5","mocha":"^2.2.1","should":"^5.2.0"},"gitHead":"6108a60c6ea29d34c29361795d66186d6a8524d8","_id":"write-json@0.2.0","_shasum":"b2d49b4ae38b39cd1216ebc64401134e28798a85","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"b2d49b4ae38b39cd1216ebc64401134e28798a85","size":2127,"noattachment":false,"key":"/write-json/-/write-json-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/write-json/download/write-json-0.2.0.tgz"},"directories":{},"publish_time":1428401875841,"_cnpm_publish_time":1428401875841,"_hasShrinkwrap":false},"0.1.0":{"name":"write-json","description":"Write a JSON to file disk, also creates directories in the dest path if they don't already exist.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/write-json","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/write-json.git"},"bugs":{"url":"https://github.com/jonschlinkert/write-json/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/write-json/blob/master/LICENSE-MIT"},"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"keywords":["file","fs","json","object","package","path","pkg","stringify","write"],"_id":"write-json@0.1.0","_shasum":"0699314eff9d71ee3bc523b553ad432e1263bcfc","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"0699314eff9d71ee3bc523b553ad432e1263bcfc","size":2639,"noattachment":false,"key":"/write-json/-/write-json-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/write-json/download/write-json-0.1.0.tgz"},"directories":{},"publish_time":1418792375781,"_cnpm_publish_time":1418792375781,"_hasShrinkwrap":false}},"readme":"# write-json [![NPM version](https://img.shields.io/npm/v/write-json.svg?style=flat)](https://www.npmjs.com/package/write-json) [![NPM monthly downloads](https://img.shields.io/npm/dm/write-json.svg?style=flat)](https://npmjs.org/package/write-json) [![NPM total downloads](https://img.shields.io/npm/dt/write-json.svg?style=flat)](https://npmjs.org/package/write-json) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/write-json.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/write-json)\n\n> Write a JSON file to disk, also creates intermediate directories in the destination path if they don't already exist.\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save write-json\n```\n\n## Usage\n\n```js\nvar writeJson = require('write-json'); \n\n// async\nwriteJson('foo.json', {abc: 'xyz'}, function(err) {\n  // do stuff with err\n});\n\n// sync\nwriteJson.sync('foo.json', {abc: 'xyz'});\n```\n\n<details>\n<summary><strong>JSON.stringify</strong></summary>\n\n### arguments\n\nAll methods support the same arguments as [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) (note that if you want to pass a [replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter) function to `writeJson` - the main export, you must pass the replacer on an [options](#options) object)\n\n```js\n// async\nwriteJson('foo.json', {abc: 'xyz'}, null, 2, function(err) {\n  if (err) console.log(err);\n});\n\n// sync\nwriteJson.sync('foo.json', {abc: 'xyz'}, null, 2);\n```\n\n### options\n\nOr as an options object:\n\n```js\nvar options = {\n  replacer: function(key, value) {\n    // filter out properties\n    if (typeof value === 'string') {\n      return undefined;\n    }\n    return value;\n  },\n  indent: 2\n};\n\n// async\nwriteJson('foo.json', {abc: 'xyz'}, options, function(err) {\n  if (err) console.log(err);\n});\n\n// sync\nwriteJson.sync('actual/test.json', expected, options);\n```\n\n</details>\n\n## API\n\n### [writeJson](index.js#L58)\n\nCalls `JSON.stringify` on the given `value` then asynchronously writes the result to a file, replacing the file if it already exists and creating any intermediate directories if they don't already exist. Returns a promise if a callback function is not passed.\n\n**Params**\n\n* `filepath` **{string}**: Destination file path\n* `value` **{object}**: Value to stringify.\n* `options` **{object}**: Options to pass to [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify)\n* `callback` **{Function}**: (optional) If no callback is provided, a promise is returned.\n* `returns` **{undefined}**\n\n**Example**\n\n```js\nvar writeJson = require('write');\nvar pkg = {name: 'write-json'};\n\nwriteJson('foo.json', pkg, function(err) {\n  if (err) console.log(err);\n});\n\n// pass options to JSON.stringify explicitly\nwriteJson('foo.json', pkg, null, 2, function(err) {\n  if (err) console.log(err);\n});\n\n// pass options to JSON.stringify as an object\n// (since this method returns a promise if no callback is passed,\n// if you want to pass a replacer function to JSON.stringify, it\n// must be passed on an options object)\nwriteJson('foo.json', pkg, {\n  indent: 2,\n  replacer: function(value) {\n    // filter out properties\n    if (typeof value === 'string') {\n      return undefined;\n    }\n    return value;\n  }\n}, function(err) {\n  if (err) console.log(err);\n});\n```\n\n### [.promise](index.js#L84)\n\nThe promise version of [writeFile](#writefile). Returns a promise.\n\n**Params**\n\n* `filepath` **{String}**: Destination file path\n* `value` **{any}**: The value to stringify\n* `options` **{object}**: Options to pass to [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify)\n* `returns` **{Promise}**\n\n**Example**\n\n```js\nvar writeJson = require('write');\nwriteJson.promise('package.json', {name: 'write-json'})\n  .then(function() {\n    // do stuff\n  });\n```\n\n### [.sync](index.js#L104)\n\nThe synchronous version of [writeFile](#writefile). Returns undefined.\n\n**Params**\n\n* `filepath` **{String}**: Destination file path\n* `value` **{any}**: The value to stringify\n* `options` **{object}**: Options to pass to [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify)\n* `returns` **{undefined}**\n\n**Example**\n\n```js\nvar writeJson = require('write');\nwriteJson.sync('package.json', {name: 'write-json'});\n```\n\n### [.stream](index.js#L129)\n\nThe stream version of [writeFile](#writefile). Returns a new [WriteStream](https://nodejs.org/api/fs.html#fs_class_fs_writestream) object.\n\n**Params**\n\n* `filepath` **{string|Buffer|integer}**: filepath or file descriptor.\n* `options` **{object}**: Options to pass to [mkdirp](https://github.com/substack/node-mkdirp) and [fs.createWriteStream][fs]{#fs_fs_createwritestream_path_options}\n* `returns` **{Stream}**: Returns a new [WriteStream](https://nodejs.org/api/fs.html#fs_class_fs_writestream) object. (See [Writable Stream](https://nodejs.org/api/stream.html#stream_class_stream_writable)).\n\n**Example**\n\n```js\nvar fs = require('fs');\nvar writeJson = require('write');\nfs.createReadStream('defaults.json')\n  .pipe(writeJson.stream('package.json'))\n  .on('close', function() {\n    // do stuff\n  });\n```\n\n## Release history\n\n### v2.0.0 - 2017-07-10\n\n**Changed**\n\n* The main function now returns a promise if no callback is passed\n\n**Added**\n\n* adds [promise support](#promise)\n* adds [stream support](#stream)\n\n### v1.0.0 - 2017-04-12\n\n**Fixed**\n\n* Make sure `JSON.stringify` receives all intended arguments\n\n## About\n\n<details>\n<summary><strong>Contributing</strong></summary>\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n</details>\n\n<details>\n<summary><strong>Running Tests</strong></summary>\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install && npm test\n```\n\n</details>\n\n<details>\n<summary><strong>Building docs</strong></summary>\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme && verb\n```\n\n</details>\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [delete](https://www.npmjs.com/package/delete): Delete files and folders and any intermediate directories if they exist (sync and async). | [homepage](https://github.com/jonschlinkert/delete \"Delete files and folders and any intermediate directories if they exist (sync and async).\")\n* [read-data](https://www.npmjs.com/package/read-data): Read JSON or YAML files. | [homepage](https://github.com/jonschlinkert/read-data \"Read JSON or YAML files.\")\n* [read-yaml](https://www.npmjs.com/package/read-yaml): Very thin wrapper around js-yaml for directly reading in YAML files. | [homepage](https://github.com/jonschlinkert/read-yaml \"Very thin wrapper around js-yaml for directly reading in YAML files.\")\n* [write-data](https://www.npmjs.com/package/write-data): Write a YAML or JSON file to disk. Automatically detects the format to write based… [more](https://github.com/jonschlinkert/write-data) | [homepage](https://github.com/jonschlinkert/write-data \"Write a YAML or JSON file to disk. Automatically detects the format to write based on extension. Or pass `ext` on the options.\")\n* [write-yaml](https://www.npmjs.com/package/write-yaml): Write YAML. Converts JSON to YAML writes it to the specified file. | [homepage](https://github.com/jonschlinkert/write-yaml \"Write YAML. Converts JSON to YAML writes it to the specified file.\")\n* [write](https://www.npmjs.com/package/write): Write data to a file, replacing the file if it already exists and creating any… [more](https://github.com/jonschlinkert/write) | [homepage](https://github.com/jonschlinkert/write \"Write data to a file, replacing the file if it already exists and creating any intermediate directories if they don't already exist. Thin wrapper around node's native fs methods.\")\n\n### Author\n\n**Jon Schlinkert**\n\n* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert)\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on January 26, 2018._","_attachments":{},"homepage":"https://github.com/jonschlinkert/write-json","bugs":{"url":"https://github.com/jonschlinkert/write-json/issues"},"license":"MIT"}