NatLibFi/melinda-api-client

View on GitHub

Showing 6 of 10 total issues

Function constructor has 186 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function constructor(config) {

    marc_record.MarcRecord.setValidationOptions({subfieldValues: false});

    function loadRecord(id, params, raw) {
Severity: Major
Found in lib/index.js - About 7 hrs to fix

    Function parseResponse has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function parseResponse(response) {
          var parser = new xmldom.DOMParser();
          var doc = parser.parseFromString(response);
    
          var messages = textContents(doc.getElementsByTagName('message')).map(parseMessage);
    Severity: Major
    Found in lib/index.js - About 2 hrs to fix

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

      module.exports = function(grunt) {
      
          grunt.initConfig({
              jshint: {
                  options: {
      Severity: Minor
      Found in Gruntfile.js - About 1 hr to fix

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

            function loadChildRecords(id, params, raw) {
        
              var defer = Q.defer();
              raw = raw || false;
        
        
        Severity: Minor
        Found in lib/index.js - About 1 hr to fix

          Function updateRecord has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function updateRecord(record, params) {
                var defer = Q.defer();
          
                var idFields = record.fields.filter(function (f) {return f.tag == "001";});
                if (idFields.length !== 1 || isNaN(idFields[0].value)) {
          Severity: Minor
          Found in lib/index.js - About 1 hr to fix

            Function createRecord has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function createRecord(record, params) {
                  var defer = Q.defer();
            
                  record.fields = record.fields.filter(function (f) {
                    return f.tag !== "001";
            Severity: Minor
            Found in lib/index.js - About 1 hr to fix
              Severity
              Category
              Status
              Source
              Language