7fife-backend/node_modules/mongoose/lib/helpers/model/applyStatics.js

14 lines
257 B
JavaScript
Raw Normal View History

2024-03-07 13:01:44 +00:00
'use strict';
/**
* Register statics for this model
* @param {Model} model
* @param {Schema} schema
* @api private
*/
module.exports = function applyStatics(model, schema) {
for (const i in schema.statics) {
model[i] = schema.statics[i];
}
};