madapaja/jquery.selection

View on GitHub

Showing 3 of 3 total issues

Function _getCaretInfo has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var _getCaretInfo = function(element){
        var res = {
            text: '',
            start: 0,
            end: 0
Severity: Minor
Found in src/jquery.selection.js - About 1 hr to fix

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

            selection: function(mode) {
                var getText = ((mode || 'text').toLowerCase() === 'text');
    
                try {
                    if (win.getSelection) {
    Severity: Minor
    Found in src/jquery.selection.js - About 1 hr to fix

      Avoid too many return statements within this function.
      Open

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