1.0.7 • Published 8 years ago

mongoose-default-values v1.0.7

Weekly downloads
1
License
ISC
Repository
github
Last release
8 years ago

Mongoose default values.

This plugin sets all default value for all schema's fields.

Install

  npm i mongoose-default-values
  var mongoose-default-values = require('mongoose-default-values');

  Schema.plugin(mongoose-default-values, {'String': 'defaultValue'});

API

Options contain all values for all types. If there is no provided value then plugin will take it from defaults.