npm.io
1.5.0 • Published 2 years ago

mongoose-sanitize

Licence
MIT
Version
1.5.0
Deps
2
Size
3 kB
Vulns
0
Weekly
0
Stars
2

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.

Keywords