{"_id":"@ceyhuncicek/jsontocsv","_rev":"2-9ba272e6e010f1ba381640704836eb77","name":"@ceyhuncicek/jsontocsv","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@ceyhuncicek/jsontocsv","version":"1.0.0","keywords":["json","csv","converter","utility","cli"],"author":{"name":"Ceyhun Cicek","email":"ceyhuncicek@users.noreply.github.com"},"license":"MIT","_id":"@ceyhuncicek/jsontocsv@1.0.0","maintainers":[{"name":"ceyhuncicek","email":"cicekceyhun@gmail.com"}],"bin":{"jsontocsv":"jsonToCsv.js"},"dist":{"shasum":"0ccb56fa8ca30757be3aba46c8a927faa3190199","tarball":"https://registry.npmjs.org/@ceyhuncicek/jsontocsv/-/jsontocsv-1.0.0.tgz","fileCount":6,"integrity":"sha512-LtCv7Iv5ROUO1D9NHFqF9i+9/4M2GWzQkbD9ExZ0P7R/lziiuY2xmmQuxNVV5YzEOigLKddlD/j2ZTOp8eOuIw==","signatures":[{"sig":"MEUCIQCuMky18b8gPd3wnV6nrBf6GyAgru0o4J/YbG1uZaz3EAIgPeFHGLmzTA9wezAWwtFkg2s832lIQ/2YDlQHqXOHY/M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5219},"main":"jsonToCsv.js","gitHead":"c0331306d4d0a64f88fec89d7611f4d816bc0452","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ceyhuncicek","email":"cicekceyhun@gmail.com"},"_npmVersion":"10.9.0","description":"A Node.js utility to convert JSON files to CSV format","directories":{},"_nodeVersion":"22.12.0","dependencies":{"csv-writer":"^1.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/jsontocsv_1.0.0_1748737652980_0.7936436231074158","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@ceyhuncicek/jsontocsv","version":"1.1.0","description":"A Node.js utility to convert JSON files to CSV format","main":"jsonToCsv.js","bin":{"jsontocsv":"jsonToCsv.js"},"license":"MIT","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["json","csv","converter","utility","cli"],"author":{"name":"Ceyhun Cicek","email":"ceyhuncicek@users.noreply.github.com"},"dependencies":{"csv-writer":"^1.6.0"},"_id":"@ceyhuncicek/jsontocsv@1.1.0","gitHead":"49ddd06ad77575d235b0b250208080a97462e859","_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-l6Mvuq5va3BxjDUkmg2Y5b60nhapWwhbyGrM1OMSNxZmK/QMCKwLmv0n3ShSN9JTFRbgeBISyZ6/vHi56KRoLw==","shasum":"2604eee2a344d86d7f08a9262f8f6a77c0ea9e02","tarball":"https://registry.npmjs.org/@ceyhuncicek/jsontocsv/-/jsontocsv-1.1.0.tgz","fileCount":6,"unpackedSize":5621,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFHCmvJ0LsGwmGKtDSPxoO9a+S6zFlkwZkWhAJMPdY9wAiEAh+PrGKRGYo9fJmck39bB3a4v05ONTyUGIOB0WglHILg="}]},"_npmUser":{"name":"ceyhuncicek","email":"cicekceyhun@gmail.com"},"directories":{},"maintainers":[{"name":"ceyhuncicek","email":"cicekceyhun@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/jsontocsv_1.1.0_1748737808450_0.7155727638347789"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-01T00:27:32.900Z","modified":"2025-06-01T00:30:08.847Z","1.0.0":"2025-06-01T00:27:33.181Z","1.1.0":"2025-06-01T00:30:08.647Z"},"author":{"name":"Ceyhun Cicek","email":"ceyhuncicek@users.noreply.github.com"},"license":"MIT","keywords":["json","csv","converter","utility","cli"],"description":"A Node.js utility to convert JSON files to CSV format","maintainers":[{"name":"ceyhuncicek","email":"cicekceyhun@gmail.com"}],"readme":"# JSON to CSV Converter\n\nA simple Node.js utility to convert JSON files to CSV format.\n\n## Installation\n\n### Using npx (Recommended)\n\nNo installation required! Use directly with npx:\n\n```bash\nnpx @ceyhuncicek/jsontocsv <input-json-file> <output-csv-file>\n```\n\n### Local Installation\n\n```bash\nnpm install\n```\n\n## Usage\n\n### Using npx (No Installation Required)\n\n```bash\nnpx @ceyhuncicek/jsontocsv data.json output.csv\n```\n\nThis will automatically download and run the latest version without requiring local installation.\n\n### Command Line (Local Installation)\n\n```bash\nnode jsonToCsv.js <input-json-file> <output-csv-file>\n```\n\nExample:\n\n```bash\nnode jsonToCsv.js data.json output.csv\n```\n\n### Programmatic Usage\n\n```javascript\nconst convertJsonToCsv = require(\"./jsonToCsv\");\n\nconst jsonData = [\n  { name: \"John\", age: 30 },\n  { name: \"Jane\", age: 25 },\n];\n\nconvertJsonToCsv(jsonData, \"output.csv\")\n  .then(() => console.log(\"Conversion complete\"))\n  .catch((error) => console.error(\"Error:\", error));\n```\n\n## Input Format\n\nThe input JSON should be either:\n\n- An array of objects\n- A single object\n\nEach object should have consistent keys that will be used as CSV headers.\n\n## Error Handling\n\nThe converter includes error handling for:\n\n- Invalid JSON input\n- Empty data\n- File system errors\n- Invalid arguments\n","readmeFilename":"README.md"}