mongoose-sanitize

1.2.0 • Public • Published

Usage

const sanitizer = require('mongoose-sanitize');

mongooseSchema.plugin(sanitizer, options);  // `options` optional field

Options

let options = { skip:[], include:[] }
  • Skip Array indicating which fields should be excluded from being sanitized. If omitted or empty, every field in the document will be sanitized.
  • Include Array indicating which fields should be included to be sanitized. If omitted or empty, every field in the document will be sanitized.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.2.0
    324
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.2.0
    324
  • 1.1.0
    102
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i mongoose-sanitize

Weekly Downloads

426

Version

1.2.0

License

MIT

Unpacked Size

3.54 kB

Total Files

5

Last publish

Collaborators

  • abhi11210646