{"id":24001708,"url":"https://github.com/niftinessafoot/write-json","last_synced_at":"2026-02-03T11:01:32.982Z","repository":{"id":231190528,"uuid":"780619004","full_name":"niftinessafoot/write-json","owner":"niftinessafoot","description":"📝 A JSON file-writing package designed for NPM initializers and places where Node needs to write static files.","archived":false,"fork":false,"pushed_at":"2024-09-23T23:44:34.000Z","size":149,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-05T18:45:21.674Z","etag":null,"topics":["filesystem","json","node"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/niftinessafoot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-04-01T21:03:24.000Z","updated_at":"2024-04-02T23:34:14.000Z","dependencies_parsed_at":"2025-06-26T11:38:51.579Z","dependency_job_id":"ca608bb7-aab4-4686-b5a7-95261ed93451","html_url":"https://github.com/niftinessafoot/write-json","commit_stats":null,"previous_names":["niftinessafoot/write-json"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/niftinessafoot/write-json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niftinessafoot%2Fwrite-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niftinessafoot%2Fwrite-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niftinessafoot%2Fwrite-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niftinessafoot%2Fwrite-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niftinessafoot","download_url":"https://codeload.github.com/niftinessafoot/write-json/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niftinessafoot%2Fwrite-json/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29043645,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T10:09:22.136Z","status":"ssl_error","status_checked_at":"2026-02-03T10:09:16.814Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["filesystem","json","node"],"created_at":"2025-01-08T00:37:37.791Z","updated_at":"2026-02-03T11:01:30.655Z","avatar_url":"https://github.com/niftinessafoot.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniftinessafoot%2Fwrite-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniftinessafoot%2Fwrite-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniftinessafoot%2Fwrite-json/lists"}