mongoose-soft-delete-ex
v1.0.3
Published
Mongoose soft delete adding timestamp, overwriting the methods 'count, find, findOne, indOneAndUpdate, update' and adding the method 'restore'
Downloads
15
Maintainers
Readme
Mongoose plugin for soft delete
Installation
> npm install mongoose-soft-delete-ex
Usage
var mongoose = require('mongoose');
mongoose.plugin( require('mongoose-soft-delete-ex') );
Methods overwriting for exclude deleted documents
count
find
findOne
findOneAndUpdate
update
Methods added for soft delete
delete
findByIdAndDelete
findOneAndDelete
Methods added for restore
restore