micro-toolkit/api-generator-js

View on GitHub
lib/embed.js

Summary

Maintainability
A
2 hrs
Test Coverage

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

function fetchEmbed(relations, config, data, headers){
  var promises = relations.map(function(relation){
    var parent = config.metadata[relation.version][relation.parent];
    var isCollection = isCollectionRelation(relation);
    var isResource = !isCollection;
Severity: Minor
Found in lib/embed.js - About 1 hr to fix

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

      var promises = relations.map(function(relation){
        var parent = config.metadata[relation.version][relation.parent];
        var isCollection = isCollectionRelation(relation);
        var isResource = !isCollection;
        var idKey = isCollection ? parent.idKey : relation.modelFk;
    Severity: Minor
    Found in lib/embed.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status