Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Some generic methods, statics and virtuals used for user schemas
JavaScript
branch: master
Failed to load latest commit information.
lib fix indenting
test initial commit
.gitignore initial commit
CONTRIBUTING.md add license and contributing
History.md Release 0.0.1
LICENSE.txt add license and contributing
Makefile initial commit
README.md update readme
index.js initial commit
package.json Release 0.0.1

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

Something went wrong with that request. Please try again.