UNPKG

@momsfriendlydevco/moody

Version:

MOngoose On DYnamo - Wrapper for AWS, bringing the API closer to Mongoose

11 lines (8 loc) 266 B
module.exports = function MoodyDocument(model, data) { // Create initial prototype from model.prototype // Note that virtual values are calculated upstream var myd = Object.create(model.prototype); // Assign all data Object.assign(myd, data); return myd; };