mongoose-ownable

0.1.3 • Public • Published

mongoose-ownable

a mongoose plugin adding owner_id to model instance and findByIdAndOwnerId static methods

Install

Install the module with:

npm install mongoose-ownable

Usage

var ownable = require('mongoose-ownable');
 
var TestSchema = new Schema({});
 
TestSchema.plugin(ownable);
 
TestModel = mongoose.model("Test", TestSchema);
 

License

Copyright (c) 2014 yi Licensed under the MIT license.

/mongoose-ownable/

    Package Sidebar

    Install

    npm i mongoose-ownable

    Weekly Downloads

    4

    Version

    0.1.3

    License

    none

    Last publish

    Collaborators

    • yi