{"version":"0.0.0","name":"csv-generate","description":"CSV and object generation implementing the Node.js `stream.Readable` API","repository":{"type":"git","url":"http://www.github.com/wdavidw/node-csv-generate"},"dependencies":{},"devDependencies":{"coffee-script":"latest","mocha":"latest","should":"latest"},"optionalDependencies":{},"main":"./lib","scripts":{"test":"make test"},"_id":"csv-generate@0.0.0","dist":{"shasum":"85a1524025482ab7556308ba0dbfec7f84455db3","tarball":"http://registry-npm.ywwl.com/csv-generate/download/csv-generate-0.0.0.tgz","integrity":"sha512-YElUz1pLG7Q6erXG0KK8wrr9XTMqxcqGRbmfIByC6lUtfx84Ze8dezfurqfKfoxZuNQs8owy+xLkEUXI62jKHw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDlIvccRSLG480abMmJp0fomyWHotI5uoVcXC2MRa1pUAiA4ij8O1da/77XqDcg45HtcfdIDmkxeXRzojGInM2vACQ=="}],"size":5434,"noattachment":false,"key":"/csv-generate/-/csv-generate-0.0.0.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"david","email":"david@adaltas.com"},"maintainers":[{"name":"david","email":"david@adaltas.com"}],"directories":{},"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":1395098236947,"_cnpm_publish_time":1395098236947,"dist-tags":{"latest":"4.6.2"}}