collection of mongoose plugins and schemas

npm install mongoose-utils
4 downloads in the last week
18 downloads in the last month

Mongoose Utils

A collection of mongoose validations, plugins, and utilities.

var utils = require('mongoose-utils'),
    mongoose = require('mongoose');

var User = new mongoose.Schema({
  email         : { type: String, index: true, required:true, unique: true, validate: [, 'not valid'] },
  password      : { type: String, trim: true, required:true, validate: [utils.validate.length(4), 'required to be at least 4 characters'] }
}, {strict:true});

// Plugins

npm loves you