Some generic methods, statics and virtuals used for user schemas
JavaScript Makefile
Switch branches/tags
Nothing to show
Latest commit 12f02e8 Nov 19, 2015 @madhums madhums Merge pull request #4 from numbnut/local-variables-fix
unused local variables fixed
Permalink
Failed to load latest commit information.
lib unused local variables fixed Nov 19, 2015
test
.gitignore initial commit Apr 30, 2013
CONTRIBUTING.md
History.md
LICENSE.txt add license and contributing Jan 1, 2014
Makefile
README.md update readme Jun 19, 2013
index.js
package.json

README.md

mongoose-user

Some generic methods, statics and virtuals used for user schemas

Installation

$ npm install mongoose-user

or include it in package.json

Usage

var mongoose = require('mongoose')
var userPlugin = require('mongoose-user')

var UserSchema = new mongoose.Schema({
  name: { type: String, default: '' },
  email: { type: String, default: '' },
  username: { type: String, default: '' },
  hashed_password: { type: String, default: '' },
  salt: { type: String, default: '' }
})

UserSchema.plugin(userPlugin, {})

mongoose.model('User', UserSchema)

License

MIT