@rojo2/mongoose-user

1.0.2 • Public • Published

Mongoose User plugin

Travis CI

This mongoose plugin adds four properties to the schema: username, email, password and status.

status represents the three main possible statuses of a user not-enabled, enabled and disabled.

const user = require("mongoose-user");
const {Schema} = require("mongoose");

const UserSchema = new Schema({
  type: {
    type: String,
    default: "regular",
    enum: ["premium","regular"]
  }
});

UserSchema.plugin(user);

Made with by ROJO 2 (http://rojo2.com)

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    2
  • 1.0.1
    1

Package Sidebar

Install

npm i @rojo2/mongoose-user

Weekly Downloads

3

Version

1.0.2

License

MIT

Last publish

Collaborators

  • azazeln28
  • aitormm