From eab903db2fcb0dee8eb4cd44916be56bcc62dec3 Mon Sep 17 00:00:00 2001 From: Benjamin Pannell Date: Wed, 11 Dec 2013 11:13:10 +0200 Subject: [PATCH] Added example of changing case of collections --- example/LowercaseCollectionsPlugin.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 example/LowercaseCollectionsPlugin.js diff --git a/example/LowercaseCollectionsPlugin.js b/example/LowercaseCollectionsPlugin.js new file mode 100644 index 0000000..df8b598 --- /dev/null +++ b/example/LowercaseCollectionsPlugin.js @@ -0,0 +1,9 @@ +var Database = require('iridium'); + +var Plugin = { + newModel: function(db, db, collection, schema, options) { + this.collection = collection.toLowerCase(); + } +}; + +module.exports = Plugin; \ No newline at end of file