0.1.0 • Published 12 years ago

clutteredcouch v0.1.0

Weekly downloads
3
License
-
Repository
github
Last release
12 years ago

Cluttered Couch

Generates CouchDB documents based on a size that you specify in bytes. The internals of the document don't really matter, but you can configure a field name and the document's _id.

This is especially useful for automated testing systems where you care about the size of the document, not its contents.

Licensed under Apache 2.0.

Functions

  1. clutteredCouch.single(opts);

Returns: Buffer

opts = { size: , id: <optional, the doc's _id>, fieldName: <optional, string for the field name> };

id defaults to null, causing couchdb to generate an _id fieldName defaults to "bwah"

  1. clutteredCouch.many(num, opts);

Returns: Array of Buffer classes

Takes the number of documents to generate (num) and the options to generate the documents with (passed to clutteredCouch.single()).

num defaults to 10 opts defaults to { size: 1000 }