MOOver.js/node_modules/mongoose/lib/helpers/model/applyStatics.js

13 lines
241 B
JavaScript
Raw Normal View History

2022-02-18 12:54:33 +00:00
'use strict';
/*!
* Register statics for this model
* @param {Model} model
* @param {Schema} schema
*/
module.exports = function applyStatics(model, schema) {
for (const i in schema.statics) {
model[i] = schema.statics[i];
}
};