Permalink
Browse files

minor serializeObject consistency tweak

  • Loading branch information...
1 parent 15db537 commit ba48fa02369b00611319d55d6970f9a69b0f744a @cowboy cowboy committed Jan 21, 2010
Showing with 5 additions and 4 deletions.
  1. +3 −2 jquery.ba-serializeobject.js
  2. +2 −2 jquery.ba-serializeobject.min.js
View
5 jquery.ba-serializeobject.js
@@ -1,5 +1,5 @@
/*!
- * jQuery serializeObject - v0.1 - 1/20/2010
+ * jQuery serializeObject - v0.2 - 1/20/2010
* http://benalman.com/
*
* Copyright (c) 2010 "Cowboy" Ben Alman
@@ -11,7 +11,8 @@
// .serializeObject() serializes a form into an (arguably more
// useful) object.
-(function($){
+(function($,undefined){
+ '$:nomunge'; // Used by YUI compressor.
$.fn.serializeObject = function(){
var obj = {};
View
4 jquery.ba-serializeobject.min.js
@@ -1,9 +1,9 @@
/*
- * jQuery serializeObject - v0.1 - 1/20/2010
+ * jQuery serializeObject - v0.2 - 1/20/2010
* http://benalman.com/
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
-(function(a){a.fn.serializeObject=function(){var b={};a.each(this.serializeArray(),function(d,e){var f=e.name,c=e.value;b[f]=b[f]===undefined?c:a.isArray(b[f])?b[f].concat(c):[b[f],c]});return b}})(jQuery);
+(function($,a){$.fn.serializeObject=function(){var b={};$.each(this.serializeArray(),function(d,e){var f=e.name,c=e.value;b[f]=b[f]===a?c:$.isArray(b[f])?b[f].concat(c):[b[f],c]});return b}})(jQuery);

0 comments on commit ba48fa0

Please sign in to comment.