npm

mongoose-soft-delete-ex

1.0.3 • Public • Published

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

Package Sidebar

Install

npm i mongoose-soft-delete-ex

Weekly Downloads

7

Version

1.0.3

License

MIT

Unpacked Size

10.2 kB

Total Files

4

Last publish

Collaborators

  • eddy_1304