lib/feathers-mongo-collections.js
function(data, params, callback) {
			if (!data.name) {
				return callback({error:'name is required'});
			}
		  this.db.createCollection(data.name, {}, function(err, collection){
		  	var response = {
		  		name:collection.collectionName,
		  		_id:collection.collectionName
		  	};
				return callback(null, response);
		  });
		}
function(data, params, callback) {
			if (!data.name) {
				return callback({error:'name is required'});
			}
		  this.db.createCollection(data.name, {}, function(err, collection){
		  	var response = {
		  		name:collection.collectionName,
		  		_id:collection.collectionName
		  	};
				return callback(null, response);
		  });
		}
function ( data , params , callback ) { if ( ! data . name ) { return callback ( { error : 'name is required' } ) ; } this . db . createCollection ( data . name , { } , function ( err , collection ) { var response = { name : collection . collectionName , _id : collection . collectionName } ; return callback ( null , response ) ; } ) ; }
Create a collection.
@param  {String} data.name - The name of the collection to be created.
@return {Object} - name:collectionName
Create a collection .