{"_id":"@afoot/write-json","name":"@afoot/write-json","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.3":{"name":"@afoot/write-json","version":"0.1.3","description":"Parse and write json to the filesystem.","scripts":{"prebuild":"npm run clean","build":"rollup -c rollup.config.js","dev":"npm run build -- -w","prepare":"npm run build","clean":"rm -rf dist/*","test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","test:coverage":"npm run test -- --coverage","postversion":"git push && git push --tags"},"type":"module","main":"dist/umd/index.js","module":"dist/esm/index.js","exports":{".":{"require":"./dist/umd/index.js","import":"./dist/esm/index.js","default":"./dist/umd/index.js"}},"repository":{"type":"git","url":"git+https://github.com/niftinessafoot/write-json.git"},"homepage":"https://github.com/niftinessafoot/write-json","keywords":["javascript","module","package.json"],"author":{"name":"Matthew Smith @niftinessafoot"},"license":"MIT","devDependencies":{"eslint":"^8.57.0","jest":"^29.7.0","rollup":"^4.13.2"},"browserslist":["defaults"],"_id":"@afoot/write-json@0.1.3","gitHead":"9d2c9200d5ba9538e1dc6a76b61bfe273f4ca0af","bugs":{"url":"https://github.com/niftinessafoot/write-json/issues"},"_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-z3JnP4Rt6hCtyxd2IoMAxd2d0aaMyi1p1xGmtmXJa1LYWq42dGeVCD/2d8beEmH6xkYv1fI05nps0pguFo90gQ==","shasum":"79059bb5e95487705e78fad7d8f262f337df9b4b","tarball":"https://registry.npmjs.org/@afoot/write-json/-/write-json-0.1.3.tgz","fileCount":5,"unpackedSize":6573,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEoOn8pkhmnbEmznfs6pfXOfs/C6Pgxs9Ble8MmL9CxrAiEAxL7e7x5ULOvjDEnld6rilqUF9FXtkUgq33tze9QmZdQ="}]},"_npmUser":{"name":"niftinessafoot","email":"niftinessafoot@gmail.com"},"directories":{},"maintainers":[{"name":"niftinessafoot","email":"niftinessafoot@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/write-json_0.1.3_1712100688968_0.33839634630599624"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-02T23:31:28.818Z","0.1.3":"2024-04-02T23:31:29.125Z","modified":"2024-04-02T23:31:29.435Z"},"maintainers":[{"name":"niftinessafoot","email":"niftinessafoot@gmail.com"}],"description":"Parse and write json to the filesystem.","homepage":"https://github.com/niftinessafoot/write-json","keywords":["javascript","module","package.json"],"repository":{"type":"git","url":"git+https://github.com/niftinessafoot/write-json.git"},"author":{"name":"Matthew Smith @niftinessafoot"},"bugs":{"url":"https://github.com/niftinessafoot/write-json/issues"},"license":"MIT","readme":"# write-json\n\nA JSON file-writing package designed for NPM initializers and places where Node needs to write static files.\n\n## installation\n\ninstall: `npm i --D @afoot/write-json`\n\nimport: `import writeJson from '@afoot/write-json'`\n\n## documentation\n\nwrite-json takes the following params:\n\n- **filename** | `string` name and extension of the file to be written\n- **json** | `Object` any valid JSON statement. Ideally object literals or arrays\n- **config** | `Object` configuration object (see below)\n\n### config object breakdown\n\n```js\n{\n errorCallback: null, // Calls if file write fails\n willFormat: true, // Option to disable tab formatting\n root: `(current working directory)`, // File path to write\n writeOptions: {flag:'w'} // Node options object for `writeFile`\n}\n```\n\n## example\n\n```js\nconst obj = { name: 'test', version: '0.0.1' };\nconst filename = 'package.json';\n\nwriteJson(filename, obj);\n```\n\n## license\n\n[MIT](./LICENSE) © [Matthew Smith](http://www.niftinessafoot.com)\n\n## made with ❤️ and ☕️ by\n\n![Niftiness Afoot!](https://gist.githubusercontent.com/niftinessafoot/2dba588395cb557293d5f09aebcd2ab0/raw/770293c76bead4f0986ff959f3ea8880017d92c0/bot.svg?sanitize=true) [Matthew Smith](https://github.com/niftinessafoot)\n","readmeFilename":"README.md"}