http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94228

Revision: 94228
Author:   krinkle
Date:     2011-08-11 03:19:29 +0000 (Thu, 11 Aug 2011)
Log Message:
-----------
Coding style commit
* Colon placement
* Trailing whitespace
* Spaces to tabs
* No need for separate var if it's just a single var (waste of space)
* Strict comparison to undefined

Modified Paths:
--------------
    trunk/phase3/resources/jquery/jquery.mwExtension.js

Modified: trunk/phase3/resources/jquery/jquery.mwExtension.js
===================================================================
--- trunk/phase3/resources/jquery/jquery.mwExtension.js 2011-08-11 03:12:12 UTC 
(rev 94227)
+++ trunk/phase3/resources/jquery/jquery.mwExtension.js 2011-08-11 03:19:29 UTC 
(rev 94228)
@@ -3,26 +3,25 @@
  */
 
 jQuery.extend({
-       trimLeft : function( str ) {
+       trimLeft: function( str ) {
                return str === null ? '' : str.toString().replace( /^\s+/, '' );
        },
-       trimRight : function( str ) {
+       trimRight: function( str ) {
                return str === null ?
                                '' : str.toString().replace( /\s+$/, '' );
        },
-       ucFirst : function( str ) {
+       ucFirst: function( str ) {
                return str.substr( 0, 1 ).toUpperCase() + str.substr( 1 );
        },
-       escapeRE : function( str ) {
+       escapeRE: function( str ) {
                return str.replace ( /([\\{}()|.?*+\-^$\[\]])/g, "\\$1" );
        },
-       isDomElement : function( el ) {
+       isDomElement: function( el ) {
                return !!el && !!el.nodeType;
        },
-       isEmpty : function( v ) {
-               var key;
-               if ( v === "" || v === 0 || v === "0" || v === null
-                       || v === false || typeof v === 'undefined' )
+       isEmpty: function( v ) {
+               if ( v === '' || v === 0 || v === '0' || v === null
+                       || v === false || v === undefined )
                {
                        return true;
                }
@@ -32,14 +31,14 @@
                        return true;
                }
                if ( typeof v === 'object' ) {
-                       for ( key in v ) {
+                       for ( var key in v ) {
                                return false;
                        }
                        return true;
                }
                return false;
        },
-       compareArray : function( arrThis, arrAgainst ) {
+       compareArray: function( arrThis, arrAgainst ) {
                if ( arrThis.length != arrAgainst.length ) {
                        return false;
                }
@@ -54,7 +53,7 @@
                }
                return true;
        },
-       compareObject : function( objectA, objectB ) {
+       compareObject: function( objectA, objectB ) {
 
                // Do a simple check if the types match
                if ( typeof objectA == typeof objectB ) {


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to