NatLibFi/marc-record-serializers

View on GitHub
src/oai-marcxml.js

Summary

Maintainability
B
5 hrs
Test Coverage

Function from has 59 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function from(xmlString, validationOptions = {}) {
  const parser = new DOMParser();
  const record = new MarcRecord();

  debug(`Parsing from xmlstring`);
Severity: Major
Found in src/oai-marcxml.js - About 2 hrs to fix

    Function reader has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function reader(stream, validationOptions = {}) {
      const emitter = new class extends EventEmitter { }();
      MarcRecord.setValidationOptions(validationOptions);
    
      start();
    Severity: Minor
    Found in src/oai-marcxml.js - About 1 hr to fix

      Function start has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function start() {
      
          let charbuffer = ''; // eslint-disable-line functional/no-let
      
          stream.on('end', () => {
      Severity: Minor
      Found in src/oai-marcxml.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status