Skip to content

Some generic methods, statics and virtuals used for user schemas

Notifications You must be signed in to change notification settings

endymion00/mongoose-user

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Some generic methods, statics and virtuals used for user schemas

Resources

Stars

Watchers

Forks

Packages

No packages published