MongooseToCsv is a mongoose plugin that creates a
CsvBuilder instance for your Schema.
var UserSchema =fullname: type: Stringemail: type: Stringage: type: Numberusername: type: String;UserSchema;var User = mongoose;// Query and streamUser;// Create stream from query resultsUser;// Transform mongoose streamsUser;
$ npm install mongoose-to-csv
Running tests requires a local mongodb server, and mocha. While most likely not a namespace issue, the test script will create a database
__mongoose_to_csv_test__, and drop the database when finished. You have been warned.
$ npm test
options argument is passed to the
CsvBuilder instance, please refer to
the Docs for more in-depth details. The only aditional property that can be included is the
virtuals have nothing to do with mongoose virtuals.
Creates a csv formated read stream from query results.
Transforms mongoose querystreams to csv formated streams.