Commit 6bc80597 authored by Timmy Willison's avatar Timmy Willison

All non-var modules should not indent in their AMD wrappers (just for prettier...

All non-var modules should not indent in their AMD wrappers (just for prettier builds). No functionality changes.
parent 2063d6c1
......@@ -2,12 +2,12 @@ define([
"../core"
], function( jQuery ) {
var rvalidchars = /^[\],:{}\s]*$/,
var rvalidchars = /^[\],:{}\s]*$/,
rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g;
jQuery.parseJSON = function( data ) {
jQuery.parseJSON = function( data ) {
// Attempt to parse using the native JSON parser first
if ( window.JSON && window.JSON.parse ) {
return window.JSON.parse( data );
......@@ -35,7 +35,8 @@ define([
}
jQuery.error( "Invalid JSON: " + data );
};
};
return jQuery.parseJSON;
return jQuery.parseJSON;
});
define([
"../core"
], function( jQuery ) {
// Cross-browser xml parsing
jQuery.parseXML = function( data ) {
// Cross-browser xml parsing
jQuery.parseXML = function( data ) {
var xml, tmp;
if ( !data || typeof data !== "string" ) {
return null;
......@@ -23,7 +24,8 @@ define([
jQuery.error( "Invalid XML: " + data );
}
return xml;
};
};
return jQuery.parseXML;
return jQuery.parseXML;
});
......@@ -5,6 +5,7 @@ define([
"./attributes/prop",
"./attributes/classes"
], function( jQuery ) {
// Return jQuery for attributes-only inclusion
return jQuery;
// Return jQuery for attributes-only inclusion
return jQuery;
});
define([
"../core"
], function( jQuery ) {
// Multifunctional method to get and set values of a collection
// The value/s can optionally be executed if it's a function
var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
// Multifunctional method to get and set values of a collection
// The value/s can optionally be executed if it's a function
var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
var i = 0,
length = elems.length,
bulk = key == null;
......@@ -52,7 +53,8 @@ define([
bulk ?
fn.call( elems ) :
length ? fn( elems[0], key ) : emptyGet;
};
};
return access;
return access;
});
......@@ -4,10 +4,10 @@ define([
"../manipulation" // buildFragment
], function( jQuery, rsingleTag ) {
// data: string of html
// context (optional): If specified, the fragment will be created in this context, defaults to document
// keepScripts (optional): If true, will include scripts passed in the html string
jQuery.parseHTML = function( data, context, keepScripts ) {
// data: string of html
// context (optional): If specified, the fragment will be created in this context, defaults to document
// keepScripts (optional): If true, will include scripts passed in the html string
jQuery.parseHTML = function( data, context, keepScripts ) {
if ( !data || typeof data !== "string" ) {
return null;
}
......@@ -32,7 +32,8 @@ define([
}
return jQuery.merge( [], parsed.childNodes );
};
};
return jQuery.parseHTML;
return jQuery.parseHTML;
});
......@@ -2,8 +2,8 @@ define([
"../core"
], function( jQuery ) {
// A method for quickly swapping in/out CSS properties to get correct calculations.
jQuery.swap = function( elem, options, callback, args ) {
// A method for quickly swapping in/out CSS properties to get correct calculations.
jQuery.swap = function( elem, options, callback, args ) {
var ret, name,
old = {};
......@@ -21,7 +21,8 @@ define([
}
return ret;
};
};
return jQuery.swap;
return jQuery.swap;
});
......@@ -3,9 +3,11 @@ define([
"../selector",
"../effects"
], function( jQuery ) {
jQuery.expr.filters.animated = function( elem ) {
jQuery.expr.filters.animated = function( elem ) {
return jQuery.grep(jQuery.timers, function( fn ) {
return elem === fn.elem;
}).length;
};
};
});
define([
"../ajax"
], function( jQuery ) {
jQuery._evalUrl = function( url ) {
jQuery._evalUrl = function( url ) {
return jQuery.ajax({
url: url,
type: "GET",
......@@ -10,7 +11,8 @@ define([
global: false,
"throws": true
});
};
};
return jQuery._evalUrl;
return jQuery._evalUrl;
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment