mongoose-address-easy
v1.1.0
Published
add address fields to a schema
Downloads
12
Readme
mongoose-address-easy
add address fields to a schema
usage
var mongoose = require('mongoose');
var mae = require('mongoose-address-easy');
var schema = new mongoose.Schema({ name: String });
mae(schema);
plugin style:
schema.plugin(mae);
options
To mark all fields as required (except address_line2
), use:
schema.plugin(mae, { required: true });