Closed enVolt closed 8 years ago
The idea is that you can pass in default settings that is true for all the schemas you attach the plugin to.
var mongooseHidden = require("mongoose-hidden")({ defaultHidden: { password: true } });
In this case if a schema has a password defined it will now be hidden. You don't have to specify on the schema that password has the hidden property.
It's a little confusing, you should update with an example, when I used it I've no idea what is default, is it an object
or string
or what, if object then what are keys . so . and . so .
True that. Until then read the code.
I still don't understand what is
defaults
in require statement.