cityssm / general-licence-manager

Function with cyclomatic complexity higher than threshold JS-R1005
Anti-pattern
Minor
a month ago3 months old
getLicences has a cyclomatic complexity of 27 with "very-high" risk
 22  searchString?: string
 23}
 24
 25export default function getLicences( 26  filters: GetLicencesFilters,
 27  options: {
 28    limit: number
Function has a cyclomatic complexity of 27 with "very-high" risk
 15      <i class="fas fa-3x fa-circle-notch fa-spin" aria-hidden="true"></i><br />
 16      <em>Loading records...</em>
 17      </p>`;
 18        cityssm.postJSON(`${glm.urlPrefix}/licences/doSearch`, formElement, (rawResponseJSON) => { 19            var _a, _b, _c, _d, _e, _f, _g, _h;
 20            const licenceResults = rawResponseJSON;
 21            const licenceList = licenceResults.licences;
getLicences has a cyclomatic complexity of 27 with "very-high" risk
  3import { licencesDB as databasePath } from '../data/databasePaths.js';
  4import getLicenceFields from './getLicenceFields.js';
  5import getLicenceTransactions from './getLicenceTransactions.js';
  6export default function getLicences(filters, options) {  7    const database = sqlite(databasePath, {
  8        readonly: true
  9    });