hummingbird-me/hummingbird

View on GitHub
app/assets/javascripts/old/jstorage.js

Summary

Maintainability
D
1 day
Test Coverage

File jstorage.js has 534 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * ----------------------------- JSTORAGE -------------------------------------
 * Simple local storage wrapper to save data on the browser side, supporting
 * all major browsers - IE6+, Firefox2+, Safari4+, Chrome4+ and Opera 10.5+
 *
Severity: Major
Found in app/assets/javascripts/old/jstorage.js - About 1 day to fix

    Function _init has 62 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function _init(){
            /* Check if browser supports localStorage */
            var localStorageReallyWorks = false;
            if("localStorage" in window){
                try {
    Severity: Major
    Found in app/assets/javascripts/old/jstorage.js - About 2 hrs to fix

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

          function _handleTTL(){
              var curtime, i, TTL, CRC32, nextExpire = Infinity, changed = false, deleted = [];
      
              clearTimeout(_ttl_timeout);
      
      
      Severity: Minor
      Found in app/assets/javascripts/old/jstorage.js - About 1 hr to fix

        Function murmurhash2_32_gc has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function murmurhash2_32_gc(str, seed) {
                var
                    l = str.length,
                    h = seed ^ l,
                    i = 0,
        Severity: Minor
        Found in app/assets/javascripts/old/jstorage.js - About 1 hr to fix

          Function _checkUpdatedKeys has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function _checkUpdatedKeys(){
                  var oldCrc32List = JSON.parse(JSON.stringify(_storage.__jstorage_meta.CRC32)),
                      newCrc32List;
          
                  _reloadData();
          Severity: Minor
          Found in app/assets/javascripts/old/jstorage.js - About 1 hr to fix

            There are no issues that match your filters.

            Category
            Status