lib/commuter/model.js
Function sendEmail
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
schema.methods.sendEmail = function (template, options) {
const name = `${this.givenName} ${this.surname}`
return new Promise((resolve, reject) => {
const opts = Object.assign({}, {
Function iterateAndApply
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
schema.statics.iterateAndApply = function (fn, opts) {
const tick = opts.tick || function () {}
const limit = opts.limit || 100
return new Promise((resolve, reject) => {
let more = true