infoderm/healthone

View on GitHub
src/parseRecord.js

Summary

Maintainability
A
2 hrs
Test Coverage
A
100%

Function parseRecord has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function parseRecord(parts, options) {
    let [descriptor, reference, ...rest] = parts;
    descriptor = descriptor.trim(); // To remove <feff> byte order mark
    reference = reference.trim(); // To remove leading and trailing spaces
    parts = [descriptor, reference, ...rest];
Severity: Minor
Found in src/parseRecord.js - About 1 hr to fix

    Avoid too many return statements within this function.
    Open

                return parseL5(parts, options);
    Severity: Major
    Found in src/parseRecord.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                  return parseA5(parts, options);
      Severity: Major
      Found in src/parseRecord.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                    return parseL1(parts, options);
        Severity: Major
        Found in src/parseRecord.js - About 30 mins to fix

          There are no issues that match your filters.

          Category
          Status