{"version":"4.0.1","name":"csv-generate","description":"CSV and object generation implementing the Node.js `stream.Readable` API","keywords":["stream","generate","csv","object"],"bugs":{"url":"https://github.com/adaltas/node-csv-generate/issues"},"author":{"name":"David Worms","email":"david@adaltas.com","url":"https://www.adaltas.com"},"devDependencies":{"@rollup/plugin-eslint":"^8.0.1","@rollup/plugin-node-resolve":"^13.0.6","@types/mocha":"^9.0.0","@types/node":"^16.11.7","@types/should":"^13.0.0","coffeescript":"~2.6.1","each":"^1.2.2","eslint":"^8.2.0","mocha":"~9.1.3","rollup":"^2.60.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","should":"~13.2.3","ts-node":"^10.4.0","typescript":"^4.4.4"},"exports":{".":{"import":"./lib/index.js","require":"./dist/cjs/index.cjs"},"./sync":{"import":"./lib/sync.js","require":"./dist/cjs/sync.cjs"}},"homepage":"https://csv.js.org/generate/","license":"MIT","main":"./dist/cjs/index.cjs","mocha":{"inline-diffs":true,"loader":"./test/loaders/all.mjs","recursive":true,"reporter":"spec","require":["should"],"throw-deprecation":true,"timeout":40000},"repository":{"type":"git","url":"git+https://github.com/adaltas/node-csv.git","directory":"packages/csv-generate"},"scripts":{"build":"npm run build:rollup && npm run build:ts","build:rollup":"npx rollup -c","build:ts":"cp lib/*.ts dist/cjs && cp lib/*.ts dist/esm","lint":"npm run lint:lib && npm run lint:samples && npm run lint:test","lint:lib":"eslint --fix lib/*.js","lint:samples":"eslint --fix samples/*.js","lint:test":"coffeelint --fix test/*.coffee","preversion":"npm run build && git add dist","pretest":"npm run build","test":"mocha 'test/**/*.{coffee,ts}'","test:legacy":"mocha --loader=./test/loaders/legacy/all.mjs 'test/**/*.{coffee,ts}'"},"type":"module","types":"dist/esm/index.d.ts","typesVersions":{"*":{".":["dist/esm/index.d.ts"],"sync":["dist/esm/sync.d.ts"]}},"gitHead":"469fb3877909c5c2146b606becaad38210945e1d","_id":"csv-generate@4.0.1","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","dist":{"integrity":"sha512-gLWZJpNpI2VJnBoKk+zjdDWpndx+1XAdlSM2oVQ9uD/caB2uRStuyPCnSPDz44Q3i5tXo0aerlVZ17zlN9CF+A==","shasum":"c5aaab795afe8bb0c22f405b8e7fed749890c288","tarball":"http://registry-npm.ywwl.com/csv-generate/download/csv-generate-4.0.1.tgz","fileCount":19,"unpackedSize":1421071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhkuTICRA9TVsSAnZWagAAUW8P/1xxH/l89xfs5H3p1MXL\nvvJU6g+Pw5/bffzv4fDTbapBb2txpGim5duacmJKXOFQFmTU5XJNO/PATUzD\nDbKb+zvDFjVtOK8YIQs8aXciYK6U4wU2VHg0V6rDme/zBsnuSpXEubae2YlX\nXCRvp3D4GuPlb8Lh3E/5qjOvTcgaacpvv59Mx6mazvti2/EyQfcbhfFSxrpi\nkaoZ/FpmThs/IjZJpCw9GHropNPosQ0tJnDOJ7oojTP8TYNFa2iG3EW9sXbV\n12AzW1P0PI6Fh99wQhAlD5IBfxyjyfNoKh7e6SFNyU14JKIW9qxPM6rWp6uM\n3GPOzYqz8UXxwJWJtAR6Nv+CMew65OVKxdlSODgUzUxK73ZUxrzke2Kc/Zh/\nvxmXdqZTW/W0HYqeGMQQPzEhSTOWBofb/9PESUPhbZLjJ8Mu85gyxSA2AcaO\nA1NCaTZJyMG3MwGPFxMq+j6xKFxvtGC5rbgRdf/KTR6+ecjE8eJHMSwQh2gp\n6QbssgecfX8O0fb1vXPttBVFL9AtcPCZilzFNvA0UQTPyhk6azDXJwkFkBYu\nJQzGqjwJrYCudaAtPoAn4uwFb93t0N5AsaoKKYjy3LmH7StM4xi42CksBphb\n1ldiK5/IuUv3YDZQRqQmXUov/+/FIUZ3Mt+ZZCSsSPKUMtOC5tL643Io5Rgn\nrbJI\r\n=C6/f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMXvRvK0K45US7Q6N6r+ennnYWVk9Nyjfvhay4z8+0YAIhAKdzf7bpP7gxsxuGxv1ApUu/aXvT69FV91ETQGrGF1Cv"}],"size":314565,"noattachment":false,"key":"/csv-generate/-/csv-generate-4.0.1.tgz"},"_npmUser":{"name":"david","email":"david@adaltas.com"},"directories":{},"maintainers":[{"name":"david","email":"david@adaltas.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/csv-generate_4.0.1_1637016776762_0.7618525757745127"},"_hasShrinkwrap":false,"readme":"\n# CSV generator 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-generate)](https://www.npmjs.com/package/csv-generate)\n[![NPM](https://img.shields.io/npm/v/csv-generate)](https://www.npmjs.com/package/csv-generate)\n\nThe [`csv-generate` package](https://csv.js.org/generate/) provides a flexible generator of random CSV strings and Javascript objects implementing the Node.js `stream.Readable` API. It is part of the [CSV project](https://csv.js.org/).\n\n## Documentation\n\n* [Project homepage](https://csv.js.org/generate/)\n* [API](https://csv.js.org/generate/api/)\n* [Options](https://csv.js.org/generate/options/)\n* [Examples](https://csv.js.org/generate/examples/)\n\n## Main features\n\n* Scalable `stream.Readable` implementation\n* random or pseudo-random seed based generation\n* Idempotence with the \"seed\" option\n* User-defined value generation\n* Multiple types of values (integer, boolean, dates, ...)\n* MIT License\n\n## Usage\n\nRun `npm install csv` to install the full CSV module or run `npm install csv-generate` if you are only interested by the CSV generator.\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/generate/api/) is available in multiple flavors. This example illustrates the stream API.\n\n```js\nimport { generate } from 'csv-generate';\nimport assert from 'assert';\n\nconst records = [];\n// Initialize the generator\ngenerate({\n  seed: 1,\n  objectMode: true,\n  columns: 2,\n  length: 2\n})\n  // Use the readable stream api to consume generated records\n  .on('readable', function(){\n    let record; while((record = this.read()) !== null){\n      records.push(record);\n    }\n  })\n  // Catch any error\n  .on('error', function(err){\n    console.error(err);\n  })\n  // Test that the generated records matched the expected records\n  .on('end', function(){\n    assert.deepEqual(records, [\n      [ 'OMH', 'ONKCHhJmjadoA' ],\n      [ 'D', 'GeACHiN' ]\n    ]);\n  });\n```\n\n## Development\n\nTests are executed with [Mocha](https://mochajs.org/). To install it, simple run `npm install` followed by `npm test`. It will install mocha and its dependencies in your project \"node_modules\" directory and run the test suite. The tests run  against the CoffeeScript source files.\n\nTo generate the JavaScript files, run `npm run coffee`.\n\nThe test suite is run online with [Travis](https://travis-ci.org/#!/adaltas/node-csv-generate). See the [Travis definition file](https://github.com/adaltas/node-csv-generate/blob/master/.travis.yml) to view the tested Node.js version.\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":1637016776907,"_cnpm_publish_time":1637016776907,"dist-tags":{"latest":"4.6.2"}}