{"name":"write-json-file","version":"2.1.0","description":"Stringify and write JSON to a file atomically","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/write-json-file.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["write","json","stringify","file","fs","graceful","stable","sort","newline","indent","atomic","atomically"],"dependencies":{"graceful-fs":"^4.1.2","make-dir":"^1.0.0","pify":"^2.0.0","sort-keys":"^1.1.1","write-file-atomic":"^2.0.0"},"devDependencies":{"ava":"*","tempfile":"^2.0.0","xo":"*"},"gitHead":"8c111fc3a619e7793bceea9b400cfafa820767be","bugs":{"url":"https://github.com/sindresorhus/write-json-file/issues"},"homepage":"https://github.com/sindresorhus/write-json-file#readme","_id":"write-json-file@2.1.0","_shasum":"ba1cf3ac7ee89db26c3d528986e48421389046b7","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"ba1cf3ac7ee89db26c3d528986e48421389046b7","tarball":"http://registry-npm.ywwl.com/write-json-file/download/write-json-file-2.1.0.tgz","integrity":"sha512-khd8SVzUPMpYJRaoOWJmq9ZW1y0QL0PTK0a0CJm8BgJg4PmkpL0QWpOXTDHB53g02ciUc/3StKRcZqqM8wnJMg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICIGoCeSI5fxE32f7oUONkm5rGIIvJQI7P7Z9IV6WgcAAiAR+gnKVS/ZVafZPNIkKuu/u0uT9qGu2GXlWf6JrF0rpw=="}],"size":2325,"noattachment":false,"key":"/write-json-file/-/write-json-file-2.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/write-json-file-2.1.0.tgz_1494572265898_0.31343368883244693"},"directories":{},"readme":"# write-json-file\n\n> Stringify and write JSON to a file [atomically](https://github.com/npm/write-file-atomic)\n\nCreates directories for you as needed.\n\n## Install\n\n```\n$ npm install write-json-file\n```\n\n## Usage\n\n```js\nimport {writeJsonFile} from 'write-json-file';\n\nawait writeJsonFile('foo.json', {foo: true});\n```\n\n## API\n\n### writeJsonFile(filePath, data, options?)\n\nReturns a `Promise`.\n\n### writeJsonFile.sync(filePath, data, options?)\n\n#### options\n\nType: `object`\n\n##### indent\n\nType: `string | number`\\\nDefault: `'\\t'`\n\nIndentation as a string or number of spaces.\n\nPass in `undefined` for no formatting.\n\n##### detectIndent\n\nType: `boolean`\\\nDefault: `false`\n\nDetect indentation automatically if the file exists.\n\n##### sortKeys\n\nType: `boolean | Function`\\\nDefault: `false`\n\nSort the keys recursively.\n\nOptionally pass in a [`compare`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) function.\n\n##### replacer\n\nType: `Function`\n\nPassed into [`JSON.stringify`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter).\n\n##### mode\n\nType: `number`\\\nDefault: `0o666`\n\nThe [mode](https://en.wikipedia.org/wiki/File_system_permissions#Numeric_notation) used when writing the file.\n\n## write-json-file for enterprise\n\nAvailable as part of the Tidelift Subscription.\n\nThe maintainers of write-json-file and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-write-json-file?utm_source=npm-write-json-file&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)\n\n## Related\n\n- [load-json-file](https://github.com/sindresorhus/load-json-file) - Read and parse a JSON file\n- [make-dir](https://github.com/sindresorhus/make-dir) - Make a directory and its parents if needed\n\n","publish_time":1494572266132,"_cnpm_publish_time":1494572266132,"dist-tags":{"latest":"7.0.0"}}