Initial commit
This commit is contained in:
12
node_modules/mongoose/lib/helpers/model/applyStatics.js
generated
vendored
Normal file
12
node_modules/mongoose/lib/helpers/model/applyStatics.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
'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];
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user