{"version":"3.4.3","name":"csv-generate","description":"CSV and object generation implementing the Node.js `stream.Readable` API","keywords":["stream","generate","csv","object"],"license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/adaltas/node-csv-generate.git"},"homepage":"https://csv.js.org/generate/","bugs":{"url":"https://github.com/adaltas/node-csv-generate/issues"},"author":{"name":"David Worms","email":"david@adaltas.com","url":"https://www.adaltas.com"},"coffeelintConfig":{"indentation":{"level":"error","value":2},"line_endings":{"level":"error","value":"unix"},"max_line_length":{"level":"ignore"}},"devDependencies":{"@babel/cli":"^7.14.8","@babel/core":"^7.15.0","@babel/preset-env":"^7.15.0","@types/mocha":"^9.0.0","@types/node":"^16.7.8","@types/should":"^13.0.0","babelify":"^10.0.0","browserify":"^17.0.0","coffeescript":"~2.5.1","each":"^1.2.2","mocha":"~9.1.1","should":"~13.2.3","ts-node":"^10.2.1","typescript":"^4.4.2"},"main":"./lib","mocha":{"throw-deprecation":true,"require":["should","coffeescript/register","ts-node/register"],"inline-diffs":true,"timeout":40000,"reporter":"spec","recursive":true},"scripts":{"build:babel":"cd lib && babel *.js -d es5 && cd ..","build:browserify":"browserify lib/index.js --transform babelify --standalone parse > lib/browser/index.js && browserify lib/sync.js --transform babelify --standalone parse > lib/browser/sync.js","build":"npm run build:babel && npm run build:browserify","preversion":"cp lib/*.ts lib/es5 && git add lib/es5/*.ts","pretest":"npm run build","test":"mocha test/**/*.{coffee,ts}"},"types":"./lib/index.d.ts","gitHead":"0fd5209b6862655c384cda052abf38019b959e70","_id":"csv-generate@3.4.3","_nodeVersion":"14.11.0","_npmVersion":"lerna/4.0.0/node@v14.11.0+x64 (darwin)","dist":{"integrity":"sha512-w/T+rqR0vwvHqWs/1ZyMDWtHHSJaN06klRqJXBEpDJaM/+dZkso0OKh1VcuuYvK3XM53KysVNq8Ko/epCK8wOw==","shasum":"bc42d943b45aea52afa896874291da4b9108ffff","tarball":"http://registry-npm.ywwl.com/csv-generate/download/csv-generate-3.4.3.tgz","fileCount":11,"unpackedSize":549834,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMdv5CRA9TVsSAnZWagAAYbwP/jlcSJku9lRc10lNurec\nFXbx9+k5M9xGi/ssniVzwMhLwLvmC+NIOfDnPmJHrmsvH8nYSTZUV6vWY8fp\n0/LCWD93c73QvwcOBZPWvUhHbkWvJNqOerRDofgs2S8f5AgDpW8BmN+y0oCG\nPrAJhy6LEdGKAvW5HMSLOAFJNwrmXoJ42S7GtgJemapXPMMgfl/lJw/aGkJE\nVkmfhqQz6fR5DBckjKeCrrRwuCRGCkTKnClctLrLzdtB/VNsHmYXzRWGYfkp\n+6crpPOstOsItHRmpDUx4K2mtFV6+y3PEG8Hlh2bJg6OVt9SJbLmvPgkR6yP\n7UPKqbw06e+mzlVZoB86VozQhY44EM0KKtRWzD9JoF5XtXP0Oz0zvqYWeF7k\njNhElXeDTZbSqn09/UtsZoEubbWmB52tj8lX/nXkzdMP6zuo5cm2l5LVNG+T\nn559ZrtC0FLYv6pVOm7MD51P/i2DI8A5DjJ5VW+pCCnQ7ZjlyVGNzjSelNQF\nvIXb2qZmxDNZg+NjU9TDg1a4azVxDz9u5UY0yXtWPTqmYzawMP5twNOb0I3Y\n1iEKChdXmfCGFSqbsvkeHBSAwHi+uiVWkd68AB2BJsLCHyvHBEJwqPxgUUTn\nC9I4tPgp582WxegI877VPwvjaErV4xN/PaI2R70lmLDFTMCQ11IJUNR3IJ7k\nmNlJ\r\n=GpiA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDbAdVSZ+2ECSlT1tH/B/Vn4W5UfQPYHhvHxPDElDhzMgIgE2k5nWiG38pssK6kA3qBKglSIH314jZVKxXXdN75HrU="}],"size":135875,"noattachment":false,"key":"/csv-generate/-/csv-generate-3.4.3.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_3.4.3_1630657529121_0.9770321054287125"},"_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":1630657529328,"_cnpm_publish_time":1630657529328,"dist-tags":{"latest":"4.6.2"}}