UNPKG

i18nucleus-mongoose

Version:
17 lines (15 loc) 492 B
exports = module.exports = function init (mongoose, modelName) { var Schema = mongoose.Schema , schemaTermsData = { _id : { type: String } , resources : { type: Schema.Types.Mixed } , lng : { type: String } , namespace : { type: String } , md5 : { type: String } } , termsSchema = Schema(schemaTermsData, { safe: true , strict: 'throw' }); return mongoose.model(modelName, termsSchema, modelName); };