ketilovre/roam

View on GitHub
src/roam.js

Summary

Maintainability
A
3 hrs
Test Coverage

Function shallowSearch has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function shallowSearch(identifier, value, exitEarly) {
    var current, memory = [];

    if (!(value instanceof Array) && value.hasOwnProperty(identifier)) {
      memory.push(value[identifier]);
Severity: Minor
Found in src/roam.js - About 1 hr to fix

    Avoid deeply nested control flow statements.
    Open

                if (prop !== identifier && json[prop] !== null && typeof json[prop] === 'object') {
                  innerLoop(json[prop]);
                }
    Severity: Major
    Found in src/roam.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                  if (current[j].hasOwnProperty(identifier)) {
                    memory.push(current[j][identifier]);
                    if (exitEarly) {
                      break outer;
                    }
      Severity: Major
      Found in src/roam.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                  for (var prop in memory) {
                    if (memory.hasOwnProperty(prop)) {
                      result = result.concat(deepSearch(segment.identifier, memory[prop], exitEarly));
                    }
                  }
        Severity: Major
        Found in src/roam.js - About 45 mins to fix

          There are no issues that match your filters.

          Category
          Status