{"_id":"mongo-to-csv","_rev":"3-cbfcd0f099157ba137e94d53bc69fe67","name":"mongo-to-csv","description":"mongoexport","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"mongo-to-csv","version":"1.0.0","description":"mongoexport","main":"mongotocsv.js","directories":{"example":"example","test":"test"},"scripts":{"test":"mocha --timeout=10000"},"repository":{"type":"git","url":"git+https://github.com/yasharma/mongo-to-csv.git"},"keywords":["mongo"],"author":{"name":"Yash Sharma"},"license":"MIT","bugs":{"url":"https://github.com/yasharma/mongo-to-csv/issues"},"homepage":"https://github.com/yasharma/mongo-to-csv#readme","devDependencies":{"mocha":"^3.2.0"},"gitHead":"d8f08b5de445e0f0f2f32253ce3efae2da7d11c0","_id":"mongo-to-csv@1.0.0","_shasum":"7e63864002767615821f3539270012d3947bcd2f","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.7.2","_npmUser":{"name":"yasharma","email":"yashsharma205@gmail.com"},"dist":{"shasum":"7e63864002767615821f3539270012d3947bcd2f","tarball":"https://registry.npmjs.org/mongo-to-csv/-/mongo-to-csv-1.0.0.tgz","integrity":"sha512-LIAFZ0B2UNNRBd2VLPu4t63I5VtLe1VJzuwRfTOmQe/uutpFjhLjvf6SZNSdvuGFipneAquoHFRMjApH96sHkw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEzNC9PeZbdvbW9DABKC7knh+GctP1ObzqT0XdgaXOhqAiEAoE7+NY/WyYEDlioSCgudwbGWUUWFs1tOSWpcw19md+A="}]},"maintainers":[{"name":"yasharma","email":"yashsharma205@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/mongo-to-csv-1.0.0.tgz_1491129183413_0.6988511411473155"}},"1.0.1":{"name":"mongo-to-csv","version":"1.0.1","description":"mongoexport","main":"mongotocsv.js","directories":{"example":"example","test":"test"},"scripts":{"test":"mocha --timeout=10000"},"repository":{"type":"git","url":"git+https://github.com/yasharma/mongo-to-csv.git"},"keywords":["mongo"],"author":{"name":"Yash Sharma"},"license":"MIT","bugs":{"url":"https://github.com/yasharma/mongo-to-csv/issues"},"homepage":"https://github.com/yasharma/mongo-to-csv#readme","devDependencies":{"mocha":"^3.2.0"},"gitHead":"4f0feb3ca731baf92018e5722f7cded0de5767c6","_id":"mongo-to-csv@1.0.1","_shasum":"a52655319833631e5e90ce8cb773cae48ba9e364","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.7.2","_npmUser":{"name":"yasharma","email":"yashsharma205@gmail.com"},"dist":{"shasum":"a52655319833631e5e90ce8cb773cae48ba9e364","tarball":"https://registry.npmjs.org/mongo-to-csv/-/mongo-to-csv-1.0.1.tgz","integrity":"sha512-8BsNTF+5Aw4LXnwawAUuQQtFaA4VVcuI9oqrqz2RC7JPSz2rroHp6PQvhJS/DXXESVNLUtASfl6DB1WqdoN+Ag==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4xf0246Z8U6CLo0+e7d+Hif1crFKpHXHavj2F8ibnHAIhAMCA5t4fGAnaLB7VvggMcUoB55GFbuILzimPgCeAvacx"}]},"maintainers":[{"name":"yasharma","email":"yashsharma205@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/mongo-to-csv-1.0.1.tgz_1491130051263_0.7335107002872974"}}},"readme":"# mongo-to-csv [![Build Status](https://travis-ci.org/yasharma/mongo-to-csv.svg?branch=master)](https://travis-ci.org/yasharma/mongo-to-csv)\nExport the mongodb collection to csv using mongoexport and nodejs\n\n## Usage\n```bash\n1. $ npm install mongo-to-csv --save\n```\n```javascript\n'use strict';\nconst mongotocsv = require('mongo-to-csv');\nlet options = {\n\tdatabase: 'users', // required\n\tcollection: 'pets', // required\n\tfields: ['name','cost'], // required\n\toutput: './output/pets.csv', // required\n\tallValidOptions: '-q \\'{ \"name\": \"cat\" }\\'' // optional\n};\nmongotocsv.export(options, function (err, success) {\n\tconsole.log(err);\n\tconsole.log(success);\n});\n```\nThis libaray uses the [`mongoexport`](https://docs.mongodb.com/manual/reference/program/mongoexport/)command provided by mongodb and execute command through nodejs [`child_process`](https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback)\n\n#### you can pass all the available options of mongoexport command here through `allValidOptions` property.\n\n### Run test\n1. clone the repo\n```bash \n$ git cone https://github.com/yasharma/mongo-to-csv.git\n```\n\n2. `cd mongo-to-csv`\n\n3. `npm install`\n\n4. `npm test`","maintainers":[{"name":"yasharma","email":"yashsharma205@gmail.com"}],"time":{"modified":"2022-06-20T06:08:34.177Z","created":"2017-04-02T10:33:04.070Z","1.0.0":"2017-04-02T10:33:04.070Z","1.0.1":"2017-04-02T10:47:33.248Z"},"homepage":"https://github.com/yasharma/mongo-to-csv#readme","keywords":["mongo"],"repository":{"type":"git","url":"git+https://github.com/yasharma/mongo-to-csv.git"},"author":{"name":"Yash Sharma"},"bugs":{"url":"https://github.com/yasharma/mongo-to-csv/issues"},"license":"MIT","readmeFilename":"README.md"}