@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)

Readme

Keywords

Package Sidebar

Install

npm i @rojo2/mongoose-user

Weekly Downloads

0

Version

1.0.2

License

MIT

Last publish

Collaborators

  • azazeln28
  • aitormm