conveyal/modeify

View on GitHub
lib/commuter/model.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function sendEmail has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

schema.methods.sendEmail = function (template, options) {
  const name = `${this.givenName} ${this.surname}`

  return new Promise((resolve, reject) => {
    const opts = Object.assign({}, {
Severity: Minor
Found in lib/commuter/model.js - About 1 hr to fix

    Function iterateAndApply has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    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
    Severity: Minor
    Found in lib/commuter/model.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status