Showing 9 of 9 total issues
Function Mask
has 348 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Mask = function (el, mask, options) {
var p = {
invalid: [],
getCaret: function () {
File jquery.mask.js
has 472 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* jquery.mask.js
* @version: v1.14.16
* @author: Igor Escobar
*
Function getMasked
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getMasked: function(skipMaskChars, val) {
var buf = [],
value = val === undefined ? p.val() : val + '',
m = 0, maskLen = mask.length,
v = 0, valLen = value.length,
Function calculateCaretPosition
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
calculateCaretPosition: function(oldVal) {
var newVal = p.getMasked(),
caretPosNew = p.getCaret();
if (oldVal !== newVal) {
var caretPosOld = el.data('mask-previus-caret-pos') || 0,
Function events
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
events: function() {
el
.on('keydown.mask', function(e) {
el.data('mask-keycode', e.keyCode || e.which);
el.data('mask-previus-value', el.val());
Function exports
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
require('time-grunt')(grunt);
grunt.initConfig({
Function init
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jMask.init = function(onlyMask) {
onlyMask = onlyMask || false;
options = options || {};
jMask.clearIfNotMatch = $.jMaskGlobals.clearIfNotMatch;
Avoid deeply nested control flow statements. Open
Open
if (resetPos === -1) {
resetPos = m;
} else if (m === lastMaskChar && m !== resetPos) {
m = resetPos - offset;
}
Avoid deeply nested control flow statements. Open
Open
if (lastMaskChar === resetPos) {
m -= offset;
}