app/assets/javascripts/old/garlic.js
File garlic.js
has 263 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
Garlic.js allows you to automatically persist your forms' text field values locally,
until the form is submitted. This way, your users don't lose any precious data if they
accidentally close their tab or browser.
Function getPath
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, getPath: function ( elem ) {
if ( 'undefined' === typeof elem ) {
elem = this.$element;
}
Function garlic
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.garlic = function ( option, fn ) {
var options = $.extend(true, {}, $.fn.garlic.defaults, option, this.data() )
, storage = new Storage()
, returnValue = false;
Function retrieve
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, retrieve: function () {
if ( this.storage.has( this.path ) ) {
// if data expired, destroy it!
if ( this.options.expires ) {
Avoid too many return
statements within this function. Open
Open
return;