Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

applyStatics.js 241B

123456789101112
  1. 'use strict';
  2. /*!
  3. * Register statics for this model
  4. * @param {Model} model
  5. * @param {Schema} schema
  6. */
  7. module.exports = function applyStatics(model, schema) {
  8. for (const i in schema.statics) {
  9. model[i] = schema.statics[i];
  10. }
  11. };