{"version":"5.6.0","name":"csv-parse","description":"CSV parsing implementing the Node.js `stream.Transform` API","keywords":["csv","parse","parser","convert","tsv","stream","backend","frontend"],"author":"David Worms <david@adaltas.com> (https://www.adaltas.com)","contributors":["David Worms <david@adaltas.com> (https://www.adaltas.com)","Will White (https://github.com/willwhite)","Justin Latimer (https://github.com/justinlatimer)","jonseymour (https://github.com/jonseymour)","pascalopitz (https://github.com/pascalopitz)","Josh Pschorr (https://github.com/jpschorr)","Elad Ben-Israel (https://github.com/eladb)","Philippe Plantier (https://github.com/phipla)","Tim Oxley (https://github.com/timoxley)","Damon Oehlman (https://github.com/DamonOehlman)","Alexandru Topliceanu (https://github.com/topliceanu)","Visup (https://github.com/visup)","Edmund von der Burg (https://github.com/evdb)","Douglas Christopher Wilson (https://github.com/dougwilson)","Joe Eaves (https://github.com/Joeasaurus)","Mark Stosberg (https://github.com/markstos)"],"exports":{".":{"import":{"types":"./lib/index.d.ts","default":"./lib/index.js"},"require":{"types":"./dist/cjs/index.d.cts","default":"./dist/cjs/index.cjs"}},"./sync":{"import":{"types":"./lib/sync.d.ts","default":"./lib/sync.js"},"require":{"types":"./dist/cjs/sync.d.cts","default":"./dist/cjs/sync.cjs"}},"./stream":{"import":{"types":"./lib/stream.d.ts","default":"./lib/stream.js"},"require":{"types":"./dist/cjs/stream.d.cts","default":"./dist/cjs/stream.cjs"}},"./browser/esm":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"./browser/esm/sync":{"types":"./dist/esm/sync.d.ts","default":"./dist/esm/sync.js"}},"devDependencies":{"@eslint/js":"^9.15.0","@rollup/plugin-node-resolve":"^15.3.0","@types/mocha":"^10.0.9","@types/node":"^22.9.1","coffeescript":"^2.7.0","csv-generate":"^4.4.2","csv-spectrum":"^2.0.0","each":"^2.7.2","eslint":"^9.15.0","eslint-config-prettier":"^9.1.0","eslint-plugin-mocha":"^10.5.0","eslint-plugin-prettier":"^5.2.1","mocha":"^10.8.2","pad":"^3.3.0","prettier":"^3.3.3","rollup":"^4.27.3","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","should":"^13.2.3","stream-transform":"^3.3.3","ts-node":"^10.9.2","typescript":"^5.6.3"},"homepage":"https://csv.js.org/parse","license":"MIT","main":"./dist/cjs/index.cjs","mocha":{"inline-diffs":true,"loader":"./test/loaders/all.js","recursive":true,"reporter":"spec","require":["should"],"throw-deprecation":false,"timeout":40000},"lint-staged":{"*.js":"npm run lint:fix","*.md":"prettier -w"},"repository":{"type":"git","url":"https://github.com/adaltas/node-csv.git","directory":"packages/csv-parse"},"scripts":{"build":"npm run build:rollup && npm run build:ts","build:rollup":"npx rollup -c","build:ts":"cp lib/index.d.ts dist/cjs/index.d.cts && cp lib/sync.d.ts dist/cjs/sync.d.cts && cp lib/*.ts dist/esm","postbuild:ts":"find dist/cjs -name '*.d.cts' -exec sh -c \"sed -i \"s/\\.js'/\\.cjs'/g\" {} || sed -i '' \"s/\\.js'/\\.cjs'/g\" {}\" \\;","lint:check":"eslint","lint:fix":"eslint --fix","lint:ts":"tsc --noEmit true","preversion":"npm run build && git add dist","test":"mocha 'test/**/*.{coffee,ts}'","test:legacy":"mocha --ignore test/api.web_stream.coffee --ignore test/api.web_stream.ts --ignore test/api.stream.finished.coffee --ignore test/api.stream.iterator.coffee --loader=./test/loaders/legacy/all.js 'test/**/*.{coffee,ts}'"},"type":"module","types":"dist/esm/index.d.ts","typesVersions":{"*":{".":["dist/esm/index.d.ts"],"sync":["dist/esm/sync.d.ts"],"browser/esm":["dist/esm/index.d.ts"],"browser/esm/sync":["dist/esm/sync.d.ts"]}},"gitHead":"cc1235a58de98dd9eab0665c7b1d03213e9633c7","_nodeVersion":"22.11.0","_npmVersion":"lerna/8.1.9/node@v22.11.0+x64 (linux)","_id":"csv-parse@5.6.0","dist":{"integrity":"sha512-l3nz3euub2QMg5ouu5U09Ew9Wf6/wQ8I++ch1loQ0ljmzhmfZYrH9fflS22i/PQEvsPvxCwxgz5q7UB8K1JO4Q==","shasum":"219beace2a3e9f28929999d2aa417d3fb3071c7f","tarball":"http://registry-npm.ywwl.com/csv-parse/download/csv-parse-5.6.0.tgz","fileCount":30,"unpackedSize":1418606,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHE4KuG+vqahHtwytdpLqTaQ8tTiS1VZQ731/NdzJ1AyAiBhmp4Xr9E9Hnc57NgdWFxtHcqrKy0GWz2iIInMFRyKwg=="}],"size":271029,"noattachment":false,"key":"/csv-parse/-/csv-parse-5.6.0.tgz"},"_npmUser":{"name":"david","email":"david@adaltas.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/csv-parse_5.6.0_1732180287414_0.03635549369728697"},"_hasShrinkwrap":false,"readme":"# CSV parser for Node.js and the web\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/adaltas/node-csv/nodejs.yml?branch=master)](https://github.com/adaltas/node-csv/actions)\n[![NPM](https://img.shields.io/npm/dm/csv-parse)](https://www.npmjs.com/package/csv-parse)\n[![NPM](https://img.shields.io/npm/v/csv-parse)](https://www.npmjs.com/package/csv-parse)\n\nThe [`csv-parse` package](https://csv.js.org/parse/) is a parser converting CSV text input into arrays or objects. It is part of the [CSV project](https://csv.js.org/).\n\nIt implements the Node.js [`stream.Transform` API](http://nodejs.org/api/stream.html#stream_class_stream_transform). It also provides a simple callback-based API for convenience. It is both extremely easy to use and powerful. It was first released in 2010 and is used against big data sets by a large community.\n\n## Documentation\n\n- [Project homepage](https://csv.js.org/parse/)\n- [API](https://csv.js.org/parse/api/)\n- [Options](https://csv.js.org/parse/options/)\n- [Info properties](https://csv.js.org/parse/info/)\n- [Common errors](https://csv.js.org/parse/errors/)\n- [Examples](https://csv.js.org/project/examples/)\n\n## Main features\n\n- Flexible with lot of [options](https://csv.js.org/parse/options/)\n- Multiple [distributions](https://csv.js.org/parse/distributions/): Node.js, Web, ECMAScript modules and CommonJS\n- Follow the Node.js streaming API\n- Simplicity with the optional callback API\n- Support delimiters, quotes, escape characters and comments\n- Line breaks discovery\n- Support big datasets\n- Complete test coverage and lot of samples for inspiration\n- No external dependencies\n- Work nicely with the [csv-generate](https://csv.js.org/generate/), [stream-transform](https://csv.js.org/transform/) and [csv-stringify](https://csv.js.org/stringify/) packages\n- MIT License\n\n## Usage\n\nRun `npm install csv` to install the full CSV module or run `npm install csv-parse` if you are only interested by the CSV parser.\n\nUse the callback and sync APIs for simplicity or the stream based API for scalability.\n\n## Example\n\nThe [API](https://csv.js.org/parse/api/) is available in multiple flavors. This example illustrates the stream API.\n\n```js\nimport assert from \"assert\";\nimport { parse } from \"csv-parse\";\n\nconst records = [];\n// Initialize the parser\nconst parser = parse({\n  delimiter: \":\",\n});\n// Use the readable stream api to consume records\nparser.on(\"readable\", function () {\n  let record;\n  while ((record = parser.read()) !== null) {\n    records.push(record);\n  }\n});\n// Catch any error\nparser.on(\"error\", function (err) {\n  console.error(err.message);\n});\n// Test that the parsed records matched the expected records\nparser.on(\"end\", function () {\n  assert.deepStrictEqual(records, [\n    [\"root\", \"x\", \"0\", \"0\", \"root\", \"/root\", \"/bin/bash\"],\n    [\"someone\", \"x\", \"1022\", \"1022\", \"\", \"/home/someone\", \"/bin/bash\"],\n  ]);\n});\n// Write data to the stream\nparser.write(\"root:x:0:0:root:/root:/bin/bash\\n\");\nparser.write(\"someone:x:1022:1022::/home/someone:/bin/bash\\n\");\n// Close the readable stream\nparser.end();\n```\n\n## Contributors\n\nThe project is sponsored by [Adaltas](https://www.adaltas.com), an Big Data consulting firm based in Paris, France.\n\n- David Worms: <https://github.com/wdavidw>\n","publish_time":1732180287646,"maintainers":[{"name":"david","email":"david@adaltas.com"}],"_cnpm_publish_time":1732180287646,"dist-tags":{"latest":"7.0.3"}}