gartz/ObjectEventTarget

View on GitHub

Showing 8 of 11 total issues

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

module.exports = function(grunt) {

  grunt.initConfig({
    meta: {
      pkg: grunt.file.readJSON('package.json'),
Severity: Major
Found in Gruntfile.js - About 1 day to fix

    File Gruntfile.js has 313 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    module.exports = function(grunt) {
    
      grunt.initConfig({
        meta: {
          pkg: grunt.file.readJSON('package.json'),
    Severity: Minor
    Found in Gruntfile.js - About 3 hrs to fix

      File ObjectEventTarget.js has 304 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      // Add a ObjectEventTarget with a prototype that can be used
      // by any object in the JavaScript context, to add, remove and trigger
      // events.
      // Example:
      // ```
      Severity: Minor
      Found in src/ObjectEventTarget.js - About 3 hrs to fix

        Function dispatch has 63 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function dispatch(obj, event){
            // Dispatch a queue of events of the tye passed inside the event object
        
            // Check if the event is a valid object
            if (!event || typeof event.type !== 'string'){
        Severity: Major
        Found in src/ObjectEventTarget.js - About 2 hrs to fix

          Function initEvent has 45 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            ObjectEvent.prototype.initEvent = function() {
              // Init event if it has some propertie wrong, fix it
          
              // Time that the event has created
              this.timeStamp = this.timeStamp || Date.now();
          Severity: Minor
          Found in src/ObjectEventTarget.js - About 1 hr to fix

            Avoid too many return statements within this function.
            Open

                      return returnValue;
            Severity: Major
            Found in src/ObjectEventTarget.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                  return returnValue;
              Severity: Major
              Found in src/ObjectEventTarget.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                        return true;
                Severity: Major
                Found in src/ObjectEventTarget.js - About 30 mins to fix
                  Severity
                  Category
                  Status
                  Source
                  Language