ncbo/bioportal_web_ui

View on GitHub
public/javascripts/JqueryPlugins/autocomplete/crossdomain_autocomplete.js

Summary

Maintainability
D
2 days
Test Coverage

Function bioportal_autocomplete has 366 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    jQuery.bioportal_autocomplete = function(input, options) {
      // Create a link to self
      var me = this;

      // Create jQuery object for input element

    File crossdomain_autocomplete.js has 409 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    // Generally we use jQuery as the keyword but some people
    // will use another framework which takes control of the $.
    // To avoid re-writing this script we'll use a wrapper.
    (function($) {
      $(function() {

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

            function dataToDom(data) {
              var ul = document.createElement("ul");
              var num = data.length;
      
              // limited results to a max number

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

            jQuery.fn.bioportal_autocomplete = function(url, options, data) {
              // Make sure options exists
              options = options || {};
              // Set url as option
              options.url = url;

          Avoid deeply nested control flow statements.
          Open

                          if (matchSubset(x0, q)) {
                            csub[csub.length] = x;
                          }

            There are no issues that match your filters.

            Category
            Status