meteor/meteor

View on GitHub
packages/deprecated/backbone/backbone.js

Summary

Maintainability
D
2 days
Test Coverage

File backbone.js has 856 lines of code (exceeds 250 allowed). Consider refactoring.
Open

//     Backbone.js 0.9.2

//     (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc.
//     Backbone may be freely distributed under the MIT license.
//     For all details and documentation:
Severity: Major
Found in packages/deprecated/backbone/backbone.js - About 2 days to fix

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

        save: function(key, value, options) {
          var attrs, current;
    
          // Handle both `("key", value)` and `({key: value})` -style calls.
          if (_.isObject(key) || key == null) {
    Severity: Minor
    Found in packages/deprecated/backbone/backbone.js - About 1 hr to fix

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

          start: function(options) {
            if (History.started) throw new Error("Backbone.history has already been started");
            // <METEOR>
            if (typeof window === 'undefined')
              throw new Error("Backbone.History is client-only, can't start on the server");
      Severity: Minor
      Found in packages/deprecated/backbone/backbone.js - About 1 hr to fix

        Function set has 35 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            set: function(key, value, options) {
              var attrs, attr, val;
        
              // Handle both `"key", value` and `{key: value}` -style arguments.
              if (_.isObject(key) || key == null) {
        Severity: Minor
        Found in packages/deprecated/backbone/backbone.js - About 1 hr to fix

          Function add has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              add: function(models, options) {
                var i, index, length, model, cid, id, cids = {}, ids = {}, dups = [];
                options || (options = {});
                models = _.isArray(models) ? models.slice() : [models];
          
          
          Severity: Minor
          Found in packages/deprecated/backbone/backbone.js - About 1 hr to fix

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

              Backbone.sync = function(method, model, options) {
                var type = methodMap[method];
            
                // Default options, unless specified.
                options || (options = {});
            Severity: Minor
            Found in packages/deprecated/backbone/backbone.js - About 1 hr to fix

              There are no issues that match your filters.

              Category
              Status