Sha256: fa1a9146a49940300243d1dea2d88395d3ddb53d3df593debebee9222a3528b6

Contents?: true

Size: 873 Bytes

Versions: 1

Compression:

Stored size: 873 Bytes

Contents

$.extend({
  modules: function(object) {
    var array = [];
    $.each(object, function(property, names_only) {
      if (property.match(/^[ABCDEFGHIJKLMNOPQRSTUVWXYZ][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]+$/)) {
        array.push(names_only === true ? property : object[property]);
      }
    });
    return array;
  }
});

$.fn.extend({
  serializeHash: function() {
    var hash = {};
    $.each(this.serializeArray(), function() {
      if(hash[this.name] === undefined) {
        hash[this.name] = this.value;
      }
      else {
        if ($.isArray(hash[this.name])) {
          hash[this.name].push(this.value);
        }
        else if (this.name.match(/\[\]$/)) {
          hash[this.name] = [hash[this.name], this.value];
        }
        else {
          hash[this.name] = this.value;
        }
      }
    });

    return hash;
  }
});

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jzip-1.0.11 test/javascripts/assets/jzip/shared/jquery/extensions/core.js